【发布时间】:2012-03-14 20:04:52
【问题描述】:
我正在尝试设置自定义本地通知声音,如下所示:
UILocalNotification *notification = [UILocalNotification new];
notification.timeZone = [NSTimeZone systemTimeZone];
notification.fireDate = date;
notification.alertAction = @"123";
notification.alertBody = @"123";
//!!!
notification.soundName = @"Glass.aiff";
alarmID=[NSString stringWithFormat:@"%i", arrayAlarms.count];
NSDictionary *infoDict = [NSDictionary dictionaryWithObject:alarmID forKey:@"id"];
notification.userInfo = infoDict;
notification.repeatInterval=NSWeekCalendarUnit;
[[UIApplication sharedApplication] scheduleLocalNotification:notification];
但我只听到默认声音。我正在 ios5 上测试应用程序。非常感谢您提前提供的帮助,对不起我的英语。
【问题讨论】:
标签: objective-c audio ios5 notifications uilocalnotification