I am using UILocalNotification. When a notification is displayed and the user clicks on my alertAction, how can I direct them to a specific view when my application loads? (Similar to how the calendar application shows you an event that has just been warned).
I use:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOption {
UILocalNotification *localNotif = [launchOptions objectForKey:UIApplicationLaunchOptionsLocalNotificationKey];
if (localNotif) {
NSString *itemName = [localNotif.userInfo objectForKey:ItemListKey];
application.applicationIconBadgeNumber = localNotif.applicationIconBadgeNumber-1;
NSLog(@"has localNotif %@",itemName);
}
return YES;
}
source
share