Created
February 24, 2016 07:50
-
-
Save ramakser/368c1d99339b044db8b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class func requestPermission() { | |
let userNotificationTypes = UIUserNotificationType.Badge | UIUserNotificationType.Alert, | |
userNotificationSettings = UIUserNotificationSettings(forTypes: userNotificationTypes, categories: nil) | |
UIApplication.sharedApplication().registerUserNotificationSettings(userNotificationSettings) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment