Created
September 23, 2016 15:09
-
-
Save DonMag/716021cd3f34009945fd8b814dd4693d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| var notification = UILocalNotification() | |
| notification.fireDate = NSDate(timeIntervalSinceNow: 15) | |
| notification.alertBody = "15-second notification" | |
| notification.alertAction = "15 seconds" | |
| notification.soundName = UILocalNotificationDefaultSoundName | |
| notification.userInfo = ["CustomField1": "15"] | |
| UIApplication.sharedApplication().scheduleLocalNotification(notification) | |
| notification = UILocalNotification() | |
| notification.fireDate = NSDate(timeIntervalSinceNow: 20) | |
| notification.alertBody = "20-second notification" | |
| notification.alertAction = "20 seconds" | |
| notification.soundName = UILocalNotificationDefaultSoundName | |
| notification.userInfo = ["CustomField1": "20"] | |
| UIApplication.sharedApplication().scheduleLocalNotification(notification) | |
| notification = UILocalNotification() | |
| notification.fireDate = NSDate(timeIntervalSinceNow: 25) | |
| notification.alertBody = "25-second notification" | |
| notification.alertAction = "25 seconds" | |
| notification.soundName = UILocalNotificationDefaultSoundName | |
| notification.userInfo = ["CustomField1": "25"] | |
| UIApplication.sharedApplication().scheduleLocalNotification(notification) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment