RPToastView works on iOS 9+ and requires Swift 4.2 to build.
Carthage or CocoaPods is the recommended way to add RPToastView to your project.
1、Add a pod entry for RPToastView to your project Podfile
pod 'RPToastView'
or
pod 'RPToastView', :git => 'https://github.com/dengfeng520/RPToastView'
2、Install the pod by running
pod install
3、 Include RPToastView wherever you need it with
import RPToastView
1、Opne terminal
cd ../projectName
touch Cartfile
2、 Open Cartfile
github "dengfeng520/RPToastView"
3、Perform update
carthage update --platform iOS
After the building is completed,include RPToastView wherever you need it class with.
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)