gpt4 book ai didi

ios - 带有振动的 UILocalNotification

转载 作者:可可西里 更新时间:2023-10-31 23:44:03 24 4
gpt4 key购买 nike

有什么方法可以在触发通知的同时添加本地通知的振动效果。

let AlarmNotification: UILocalNotification = UILocalNotification()
AlarmNotification.alertBody = title
AlarmNotification.alertAction = "Open App"
AlarmNotification.category = "AlarmCategory"

AlarmNotification.soundName = soundName + ".mp3"
AlarmNotification.timeZone = NSTimeZone.defaultTimeZone()
UIApplication.sharedApplication().scheduleLocalNotification(AlarmNotification)

最佳答案

阅读指南,您只能将声音设置为警报

the system displays the alert message, badges the app, and plays a sound—whatever is specified in the notification.

链接:https://developer.apple.com/library/ios/documentation/iPhone/Reference/UILocalNotification_Class/

关于ios - 带有振动的 UILocalNotification,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36548345/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com