有什么方法可以在触发通知的同时添加本地通知的振动效果。
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/