如何让UILocalNotification声音持续循环播放
2个回答
2016-02-05 · 知道合伙人互联网行家
护肤达人IT宅族
知道合伙人互联网行家
向TA提问 私信TA
知道合伙人互联网行家
采纳数:5637
获赞数:17441
毕业于曲阜师范大学,学士学位。互联网行业2年从业经验,读过SEO相关书籍。现任爱家网SEO优化专员。
向TA提问 私信TA
关注
展开全部
10down voteaccepted
ANSWER:
Nothing wrong with the code..
It's just that the stupid iPhone didn't cancel the old notifications that I made with the default sound -_-;
When I cleaned the project, deleted the app from the phone AND REBOOTED the phone THEN it worked..
Hope someone finds this helpful.
ANSWER:
Nothing wrong with the code..
It's just that the stupid iPhone didn't cancel the old notifications that I made with the default sound -_-;
When I cleaned the project, deleted the app from the phone AND REBOOTED the phone THEN it worked..
Hope someone finds this helpful.
展开全部
UILocalNotification *newNotification = [[UILocalNotification alloc] init]; if (newNotification) { newNotification.fireDate = newFireDate; newNotification.alertBody = clockRemember; newNotification.soundName = [NSString stringWithFormat:@"%@.caf", clockMusic]; newNotification.alertAction = @"查看闹钟"; newNotification.repeatInterval = NSWeekCalendarUnit; NSDictionary *userInfo = [NSDictionary dictionaryWithObject:clockID forKey:@"ActivityClock"]; newNotification.userInfo = userInfo; [[UIApplication sharedApplication] scheduleLocalNotification:newNotification]; }
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询