相关疑难解决方法(0)

UILocalNotification自定义声音

我一直在寻找一个解决方案几个小时..绝对没有运气.

我设置了本地通知:

UILocalNotification *notif = [[cls alloc] init];

[dateComp setDay:j+1];
[dateComp setHour:[[time objectAtIndex:0] integerValue]+offset];
[dateComp setMinute:[[time objectAtIndex:1] integerValue]];

NSLog(@"Year: %i, Month: %i, Day: %i, Time:%i:%i\n",[dateComp year], [dateComp month], 
                    [dateComp day], [dateComp hour], [dateComp minute]);

notif.fireDate = [gregorian dateFromComponents:dateComp];
notif.timeZone = [NSTimeZone defaultTimeZone];

notif.alertBody = [names objectAtIndex: k];
notif.soundName = @"fireburn.caf";
Run Code Online (Sandbox Code Playgroud)

注意声音名称......

我尝试放10个声音(aiff,wav,caf ...等),但通知只是弹出默认声音:/

我在Resources文件夹中有"fireburn.caf"文件.

为什么不播放我的声音?????

谢谢.

iphone audio nsbundle ios4 uilocalnotification

8
推荐指数
1
解决办法
1万
查看次数

标签 统计

audio ×1

ios4 ×1

iphone ×1

nsbundle ×1

uilocalnotification ×1