您的位置:首页 > 移动开发 > IOS开发

ios 本地提醒

2016-01-12 14:20 357 查看
UILocalNotification *noti =[UILocalNotification
new];
noti.alertTitle =@"hahah";
noti.alertBody =@"iiiî11111111";
noti.applicationIconBadgeNumber =9;
noti.soundName =UILocalNotificationDefaultSoundName;
noti.category =@"CATEGORY";
noti.fireDate =[NSDate
dateWithTimeIntervalSinceNow:10];
[[UIApplication
sharedApplication]scheduleLocalNotification:noti];

UIUserNotificationSettings *seting =[UIUserNotificationSettings
settingsForTypes:UIUserNotificationTypeBadge |
UIUserNotificationTypeSound |UIUserNotificationTypeAlert
categories:nil];
[application registerUserNotificationSettings:seting];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: