Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在我的 ios 应用程序中使用本地通知。有没有办法让我只显示一个振动和显示的 iOS 本地通知,而不播放任何声音?
对不起朋友, UILocalNotification 是不可能的
UILocalNotification API 可以让你设置系统默认声音,选择声音,或者没有声音,如果你有声音,它会在适当的情况下振动(即,如果你从手机设置中启用了振动)。但是你有无法控制 UILocalnotification 的振动设置。