I'm trying to build an alarm clock using UILocalNotification. I am able to schedule alarms and populate them in a UITableView.. Notification alerts are working fine, and I can easily cancel all scheduled notifications. My issues are:
- How can i delete a specific local notification from the table?
How can i keep notifications from disappearing from the table after they have been fired like the apple alarm clock when they black out after being fired.
func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) { if (editingStyle == UITableViewCellEditingStyle.Delete) { var notificationArray:NSArray = UIApplication.sharedApplication().scheduledLocalNotifications var notification:UILocalNotification = notificationArray.objectAtIndex(indexPath.row) as UILocalNotification UIApplication.sharedApplication().cancelLocalNotification(notification) alarmTable.reloadData() } }