IOS设置本地通知
来源:互联网 发布:数据上限下限设定 编辑:程序博客网 时间:2024/06/06 23:47
/******* 设置本地通知 ********/-(void)PlatformSetLocalNotification:(int)minutes hour:(int)hour day:(int)day month:(int)month year:(int)year noticeStr:(NSString*)noticeStr{ //首先清空 [[UIApplication sharedApplication] cancelAllLocalNotifications]; [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0]; //添加通知 NSCalendar *calendar = [NSCalendar autoupdatingCurrentCalendar]; NSDateComponents *dateComps = [[NSDateComponents alloc] init]; [dateComps setDay:day]; [dateComps setMonth:month]; [dateComps setYear:year]; [dateComps setHour:hour]; [dateComps setMinute:minutes]; NSDate *itemDate = [calendar dateFromComponents:dateComps]; [dateComps release]; UILocalNotification *notification=[[UILocalNotification alloc] init]; notification.fireDate = itemDate; notification.timeZone=[NSTimeZone defaultTimeZone]; NSString *str_m = nil; str_m = noticeStr; notification.alertBody = str_m; notification.alertAction =@"View"; [[UIApplication sharedApplication] scheduleLocalNotification:notification]; [notification release]; NSLog(@"PlatformSetLocalNotification end");}
0 0
- IOS设置本地通知
- ios-ios10设置本地通知
- iOS 本地通知 远程通知
- iOS本地通知 远程通知
- iOS本地通知&定时通知
- 设置本地通知
- iOS 设置每天下午4点推送本地通知
- iOS 设置每天下午4点推送本地通知
- iOS实现本地通知
- iOS本地通知
- iOS本地通知
- iOS本地通知UILocalNotification
- IOS实现本地通知
- IOS 本地通知 UILocalNotification
- ios本地通知UILocalNotification
- iOS UILocalNotification本地通知
- iOS实现本地通知
- iOS实现本地通知
- iOS:教你五分钟集成ZXing
- 几个经典表单应用
- java序列化注意点
- 每日一小练——数值自乘递归解
- 图论概念总结
- IOS设置本地通知
- SQOOP中从mysql导入数据到hive中报错解决方法
- Leetcode_recover-binary-search-tree
- 去了新博客
- VC文件的读写操作中的同步和异步
- 位域结构体
- 在Myeclipse中设置jsp页面为默认utf-8编码
- nyoj 546
- screenX clientX pageX概念