- (void)application:(UIApplication *)app didReceiveLocalNotification:(UILocalNotification *)notif {
// Handle the notificaton when the app is running
NSLog(@"Recieved Notification %@",notif);
NSLog(@"local notifications count = %d", [[[UIApplication sharedApplication] scheduledLocalNotifications] count]);
CFBundleRef mainBundle = CFBundleGetMainBundle();
CFURLRef soundFileURLRef;
soundFileURLRef =CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"everything9", CFSTR ("mp3"), NULL);
UInt32 soundID;
AudioServicesCreateSystemSoundID(soundFileURLRef, &soundID);
AudioServicesPlaySystemSound(soundID);
[[NSNotificationCenter defaultCenter] postNotificationName:@"RELOAD_DATA"object:nil];
}
当应用程序到达时(例如,当用户在 iPhone 锁定时滑动应用程序图标时)我可以在这里实现什么来推送特定视图...我正在尝试[self.navigationController pushViewController:CompletedViewController animated:YES];
并且我遇到了一些错误...是否有特定的我应该怎么做?也许在didFinishLaunchingWithOptions
?