微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

LocalNotificationHelper

程序名称:LocalNotificationHelper

LocalNotificationHelper 介绍

LocalNotificationHelper 是用 swift 编写的本地通知。

使用示例:

// Create and post local notifications
  LocalNotificationHelper.sharedInstance.postNotification(key: "mobiwise", title: "mobiwise", message: "Lets take a break", seconds: 5)
  /*
  LocalNotificationHelper.sharedInstance.postNotification(key: <#T##String#>, title: <#T##String#>, message: <#T##String#>, date: <#T##NSDate#>)
  LocalNotificationHelper.sharedInstance.postNotification(key: <#T##String#>, title: <#T##String#>, message: <#T##String#>, date: <#T##NSDate#>, soundName: <#T##String#>)
  LocalNotificationHelper.sharedInstance.postNotification(key: <#T##String#>, title: <#T##String#>, message: <#T##String#>, seconds: <#T##Double#>)
  LocalNotificationHelper.sharedInstance.postNotification(key: <#T##String#>, title: <#T##String#>, message: <#T##String#>, seconds: <#T##Double#>, soundName: <#T##String#>)
*/


  // Create action buttons and register notification
  let actionOne = LocalNotificationHelper.sharedInstance.createUserNotificationActionButton(identifier: ACTION_ONE_IDENTIFIER, title: "Like")
  let actionTwo = LocalNotificationHelper.sharedInstance.createUserNotificationActionButton(identifier: ACTION_TWO_IDENTIFIER, title: "Dislike")
  let actions = [actionOne,actionTwo]
  LocalNotificationHelper.sharedInstance.registerUserNotificationWithActionButtons(actions: actions)

LocalNotificationHelper 官网

https://github.com/AhmettKeskin/LocalNotificationHelper

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐