本地通知

UILocalNotification *notification = [[UILocalNotification alloc] init];
if (notification != nil) {
	NSDate *now = [NSDate new];
	notification.fireDate = [now dateByAddingTimeInterval:5];
	notification.alertBody = @"时间到!";
	[[UIApplication sharedApplication] scheduleLocalNotification:notification];
	[notification release];
}

 

你可能感兴趣的:(ios,iPhone,本地通知)