有沒有辦法觸發日期事件的基礎上的某種任務。我的問題是,我想播放聲音(警報)在特定的日期,它通過使用UILocalNotification工作正常,但它播放s短的聲音,我想發揮無限的聲音,而不是。我如何能實現這個目標。 等待你的早期反應。 謝謝UILocalNotification或EventKIt
0
A
回答
0
您可以使用UILocalNotification
的soundName
屬性來安排自定義聲音,但它不能是無限的。您可以使用repeatInterval
屬性再次播放警報,使其看起來無限...
2
UILocalNotification
的蘋果文檔聲明,soundName
屬性將最多播放30秒。
持續時間超過30秒的聲音被忽略,而是播放默認聲音。
同時加入了自定義的聲音,確保聲音是正確的格式(線性PCM或者IMA4)
可以使用從WAV和MP3轉換:
afconvert -f卡福-d LEI16 @ 44100 -c 1 in.wav out.caf
萬一如果u想知道什麼是afcomvert ..它只不過是命令行程序 咖啡館是容器格式..
有時仿真器不會播放自定義聲音,但設備會播放。
相關問題
- 1. UILocalNotification或EventKIt
- 2. Xamarin.iOS&Eventkit
- 3. Monkouch中的EventKitUi或EventKit的示例
- 4. UILocalNotification或推送通知
- 5. EventKit提醒
- 6. iOS EventKit Additional Predicates
- 7. EventKit權限
- 8. UILocalNotification
- 9. EventKit同步問題
- 10. 擴展EventKit功能
- 11. 在後臺運行NSTimer或UILocalNotification
- 12. UILocalNotification的自定義背景或圖標?
- 13. 我需要停止或取消UILocalNotification
- 14. Multi UILocalNotification
- 15. UIlocalNotification體
- 16. UILocalNotification repeatInterval
- 17. 爲UILocalNotification
- 18. EventKit:提醒dueDateComponents VS報警
- 19. EventKit謂詞的選擇
- 20. Eventkit的編譯錯誤
- 21. 來自String for eventkit的NSDate
- 22. 是eventKit支持IOS 3.0
- 23. 測試EventKit日曆訪問
- 24. iPhone SDK - EventKit時區問題
- 25. 沒有使用日曆或提醒應用程序的EventKit
- 26. klazuka/Kal或EventKit會處理多個日曆嗎?
- 27. UILocalNotification崩潰
- 28. UILocalNotification and alertLaunchImage
- 29. UILocalnotification不點火
- 30. UILocalNotification重複
repeatInterval必須是NSCalendarUnit,並且只能包含:NSWeekCalendarUnit,NSMonthCalendarUnit,NSDayCalendarUnit,NSHourCalendarUnit以及我們如何重複此操作以使其看起來連續? – 2013-09-28 18:50:22