iOS 设置每天下午4点推送本地通知

2015-05-28 0 491
iOS 设置每天下午4点推送本地通知
UILocalNotification *notification=[[UILocalNotification alloc] init];
    if (notification!=nil) {//判断系统是否支持本地通知
        notification.fireDate = [NSDate dateWithTimeIntervalSince1970:16*60*60*24];//本次开启立即执行的周期
        notification.repeatInterval=kCFCalendarUnitWeekday;//循环通知的周期
        notification.timeZone=[NSTimeZone defaultTimeZone];
        notification.alertBody=@"哇哇哇";//弹出的提示信息
        notification.applicationIconBadgeNumber=0; //应用程序的右上角小数字
        notification.soundName= UILocalNotificationDefaultSoundName;//本地化通知的声音
//notification.alertAction = NSLocalizedString(@"美女呀", nil);  //弹出的提示框按钮
        notification.hasAction = NO;
        [[UIApplication sharedApplication]   scheduleLocalNotification:notification];
    }

遇见资源网 objective-c iOS 设置每天下午4点推送本地通知 http://www.ox520.com/17102.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务