Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1.35 KB

Readme.md

File metadata and controls

53 lines (35 loc) · 1.35 KB

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