A lightweight toast library for iOS.
The example project contains some usages of YuiToast. You can use and modify as your like.
Clone or download YuiToast first and run the following command:
cd YuiToast/Example
pod install
Then, open Example.xcworkspace.
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
gem install cocoapods
To integrate YuiToast into your Xcode project using CocoaPods, specify it in your Podfile:
platform :ios, '11.0'
target 'Your Project Name' do
use_frameworks!
# Pods for Your Project Name
pod 'YuiToast', '0.1.0'
end
Then, run the following command:
pod install
import YuiToast
Toast.default.show(message: "Hello World")
import YuiToast
Toast.default.show(message: "Toast With Image", image: UIImage(named: "DemoImage"))
import YuiToast
Toast.default.show(message: "Hello World", duration: .never) // never disappear
Toast.default.show(message: "Hello World", duration: .timeInterval(duration: 3)) // disappears after 3 seconds
func show(_ toastItem: ToastItem)
import YuiToast
let item = Toast.defaut.show(...)
Toast.default.update(item: item) { item in
item.title = "updated"
}
Copyright (c) 2020 Tao Juncheng
LICENSE file
link |
Stars: 6 |
Last commit: 2 years ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics