我认为你可以覆盖iOS"' XXXX'配件想打开“应用程序”""在我的应用代理中使用以下提醒:
- (void)application:(UIApplication *)application didReceiveLocalNotification: (UILocalNotification *)notification
{
if([[UIApplication sharedApplication] applicationState] != UIApplicationStateBackground)
{
AudioServicesPlayAlertSound(1002);
}
AudioServicesPlayAlertSound(1002);
NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"];
UIAlertView *view = [[UIAlertView alloc] initWithTitle:appName message:[notification alertBody] delegate:nil cancelButtonTitle:nil otherButtonTitles:[notification alertAction], nil];
view.delegate = self;
[view show];
}
但这似乎并不适合我。
(只是为了澄清:我确实在后台运行样板警报,但我想自定义它们。)
任何指示赞赏!