TRAlert
(图片链接跳过)
(图片链接跳过)
使用TRAlert的应用
- StarBerry (https://apps.apple.com/us/app/starberry-video/id1522541817)
- 库存系统
更改UIView,UIButton和UIText的背景颜色
static var buttonBGColor = UIColor.black
static var viewBGColor = UIColor.white
static var buttonTextColor = UIColor.white
更改标题和消息的字体
static var headingFont = UIFont(name: "AmericanTypewriter-Bold", size: 18.0)
static var messageFont = UIFont(name: "AmericanTypewriter", size: 15.0)
支持版本
- Xcode 11 支持
- Swift 5.0 支持
示例
要运行示例项目,请先克隆存储库,然后从示例目录运行 pod install
命令。
安装
CocoaPods
CocoaPods 是 Cocoa 项目的依赖管理器。您可以使用以下命令安装它
$ gem install cocoapods
要用 CocoaPods 将 TRAlert 集成到您的 Xcode 项目中,请在 Podfile
中指定它
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
target '<Your Target Name>' do
pod 'TRAlert'
end
然后,运行以下命令
$ pod install
使用方法
let okButton = TRAlertButton.init(title: "Ok") { [weak self] in
guard let _ = self else { return}
}
Alert.show(title: "TRAlert", body: "Show message text", buttons: [okButton])
return
功能
- 使用 Storyboard 实现
- 自定义 UIView、UIButton 和 文本颜色
- 自定义 UItext 字体
作者
tayyab5588 - (https://github.com/tayyab5588)
证书
TRAlert遵循MIT证书。更多信息请参阅LICENSE文件。