I want to setup some local notifications in my iOS app, however every tutorial I seem to find on implementing these seems to only allow me to fire a notification based on a timer (see sample code below)? Is it possible to fire a local notification for example when new data is loaded to a UITableView? Sorry for the general question, but I can't seem to find a whole lot of documentation on this. I'm also not sure how I could do this if data is only grabbed when my user hits a screen? E.g. data is grabbed/updated in viewDidLoad of ViewController?
-(void)viewDidLoad {
UILocalNotification *localNotification = [[UILocalNotification alloc] init];
localNotification.fireDate = dateTime;
localNotification.alertBody = [NSString stringWithFormat:@"Alert Fired at %@", dateTime];
localNotification.soundName = UILocalNotificationDefaultSoundName;
localNotification.applicationIconBadgeNumber = 1;
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
}