UILocalNotification *notif = [UILocalNotification new];
notif.fireDate = [NSDate dateWithTimeIntervalSinceNow:3];
notif.alertBody = @"该睡觉了!!!";
notif.alertTitle = @"提示";
notif.userInfo = @{@"key":@"value"};
notif.soundName = @"default";
[[UIApplication sharedApplication] scheduleLocalNotification:notif];
网友评论