2
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"open app" message:@" backgr..." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];

[alertView show];

应用程序在后台运行时如何显示警报?

4

1 回答 1

4

UILocalNotification当您的应用在后台时使用。

UILocalNotification *notification = [[UILocalNotification alloc] init];
notification.alertBody = @"Your message";
notification.alertAction = @"Open app";
[[UIApplication sharedApplication] presentLocalNotificationNow:notification];
于 2013-03-29T11:57:55.020 回答