UILoccalNotification

iOS推送:本地通知UILocalNotification

风流意气都作罢 提交于 2019-11-30 06:43:00
Notification 是智能手机应用编程中非常常用的一种传递信息的机制,而且可以非常好的节省资源,不用消耗资源来不停地检查信息状态(Pooling),在iOS下应用分为两种不同的 Notification 种类,本地和远程。本地的 Notification 由iOS下 Notification Manager统一管理,只需要将封装好的本地 Notification 对象加入到系统 Notification 管理机制队列中,系统会在指定的时间激发将本地 Notification ,应用只需设计好处理 Notification 的方法就完成了整个Notification流程了。 本地Notification所使用的对象是 UILocalNotification , UILocalNotification 的属性涵盖了所有处理Notification需要的内容。 UILocalNotification 的属性有fireDate、timeZone、repeatInterval、repeatCalendar、alertBody、 alertAction、hasAction、alertLaunchImage、applicationIconBadgeNumber、 soundName和userInfo。 UILocalNotification 的调度 其中fireDate、timeZone