[英]How To Use Apple's Notification Sounds for User Notifications Swift
我想知道是否可以在用户通知中使用Apple的通知声音之一,而不是始终使用UNNotificationSound.default()
作为声音,或者是否可以让用户进入设置以选择声音。
No, you cannot use any system sounds. 不,您不能使用任何系统声音。 The available system sounds are located in Library/Audio
, but you can only use sounds from Library/Sounds
. 可用的系统声音位于“ Library/Audio
,但是您只能使用“ Library/Sounds
。
However, you can still provide custom sounds the user can choose from through supplying the sound files and initializing using init(named:)
. 但是,您仍然可以通过提供声音文件并使用init(named:)
初始化来提供用户可以选择的自定义声音。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.