2
我正在創建一個鬧鐘應用程序,可以連續播放我設定的聲音。現在,當鬧鐘響起時,我點擊通知,鬧鐘停止,應用程序打開。 有沒有辦法打開應用程序,但保持聲音播放時,我點擊通知?iOS鬧鐘,繼續播放鬧鐘聲音
-(void) scheduleLocalNotificationWithDate:(NSDate *)fireDate
UILocalNotification *notification = [[UILocalNotification alloc]init];
notification.fireDate = fireDate;
notification.alertBody [email protected]"Wake up!";
notification.soundName = @"sax.mp3";
[[UIApplication sharedApplication]scheduleLocalNotification:notification];
[notification release];