【问题标题】:UILocalNotification with vibration带有振动的 UILocalNotification
【发布时间】:2016-04-11 12:11:45
【问题描述】:

有什么办法可以在通知被触发的时候,加上本地通知的震动效果。

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)

【问题讨论】:

    标签: ios swift uilocalnotification


    【解决方案1】:

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

    系统显示警报消息、标记应用程序并播放 声音——通知中指定的任何内容。

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-08-31
      相关资源
      最近更新 更多