RPToastView
-
iOS 11.0+
-
Swift 5.0+
-
pod V1.7.0+
-
MIT 协议
要求
RPToastView 支持iOS 9+,并需要Swift 4.2来构建。
将 RPToastView 添加到您的项目中
将 RPToastView 添加到您的项目推荐使用 Carthage 或 CocoaPods。
CocoaPods
1、 在您的项目 Podfile 中添加 RPToastView 的 pod 条目
pod 'RPToastView'
或
pod 'RPToastView', :git => 'https://github.com/dengfeng520/RPToastView'
2、 通过运行以下命令安装 pod
pod install
3、 使用以下方法在任何需要的地方包含 RPToastView
import RPToastView
Carthage
1、 打开终端
cd ../projectName
touch Cartfile
2、 打开 Cartfile
github "dengfeng520/RPToastView"
3、 执行更新
carthage update --platform iOS
构建完成后,在任何需要的地方使用类包含 RPToastView。
import RPToastView
使用说明
var display = Display()
display.mode = .loopAndTextMode
display.title = "this is loop loading..."
display.isCustomize = true
display.bgColor = UIColor(red: 245.0/255.0, green: 190.0/255.0, blue: 98.0/255.0, alpha: 1)
display.titleColor = .white
display.outerLayer = UIColor(red: 200/255, green: 200/255, blue: 200/255, alpha: 1)
display.innerLayer = .white
RPToastView.loading(display)