Lightweight notification for iOS written in Swift
iOS 9.0+
To install ARNotification with CocoaPods, add the following lines to your Podfile:
pod 'ARNotification'
github "ArtemovRM/ARNotification"
For example, set a window for notifications in didFinishLaunchingWithOptions
import ARNotification
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
ARNotification.shared.window = self.window
var settings = ARNotificationSettings()
settings.position = ARNotificationPosition.bottom
ARNotification.shared.settings = settings
return true
}
Next
ARNotification.shared.push(type: .error, title: "Unknown error")