如何重复UILocalNotification声音?
-(IBAction) scheduleNotification1 {
local1 = [[UILocalNotification alloc] init];
// create date/time information
local1.fireDate = [NSDate dateWithTimeIntervalSinceNow:2];
local1.timeZone = [NSTimeZone defaultTimeZone];
// set notification details
local1.alertBody = @"2!";
local1.alertAction = @"View";
//local1.soundName = UILocalNotificationDefaultSoundName;
//local1.soundName = @"alarmsound.caf";
local1.soundName = @"29.mp3";
// set the badge on the app icon
local1.applicationIconBadgeNumber = 1;
// local1.repeatInterval =NSSecondCalendarUnit;//// NSMinuteCalendarUnit;
//local1.repeatInterval =1 ;
// Gather any custom data you need to save with the notification
NSDictionary *customInfo = [NSDictionary dictionaryWithObject:@"ABCD2" forKey:@"yourKey1"];
local1.userInfo = customInfo;
// Schedule it!
[[UIApplication sharedApplication] scheduleLocalNotification:local1];
//[local1 release];
}
请提供一些示例代码。
答案 0 :(得分:0)
对不起a7mad,我不敢这么说但是重复UILocal Notification的声音是不可能的。我希望你检查了SO的其他问题。所有这些都有负面结果。
我可以建议您点击LocalNotification的“查看”按钮调用警报视图或操作表,并在控制器上继续操作,因为它们可以被控制...