Skip to content

ArtemovRM/ARNotification

Repository files navigation

Build Status License Swift Version

ARNotification

Lightweight notification for iOS written in Swift

Requirements

iOS 9.0+

Install

Via CocoaPods.

To install ARNotification with CocoaPods, add the following lines to your Podfile:

pod 'ARNotification'
Via Carthage.
github "ArtemovRM/ARNotification"

Example

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")

About

Lightweight notification for iOS written in Swift

Resources

License

Stars

Watchers

Forks

Packages

No packages published