【发布时间】:2014-05-05 16:04:11
【问题描述】:
我正在创建一个闹钟应用程序,它可以连续播放我设置的声音。现在,当我在闹钟响起时单击通知时,闹钟停止并打开应用程序。 有没有办法打开应用,但点击通知时一直播放声音?
-(void) scheduleLocalNotificationWithDate:(NSDate *)fireDate
UILocalNotification *notification = [[UILocalNotification alloc]init];
notification.fireDate = fireDate;
notification.alertBody =@"Wake up!";
notification.soundName = @"sax.mp3";
[[UIApplication sharedApplication]scheduleLocalNotification:notification];
[notification release];
【问题讨论】:
标签: ios cocoa-touch audio