all*_*ius 1 ios uilocalnotification swift
UILocalNotification有一个.fireDate方法,NSDate作为一个参数然后在那时触发.但是,如果我想在我的代码中发生某些事情而不使用它的话,我该NSDate怎么办?
创建您的UILocalNotification实例并在UIAplication实例上调用该方法-presentLocalNotificationNow:
[[UIApplication sharedApplication]presentLocalNotificationNow:notification]
Run Code Online (Sandbox Code Playgroud)
在SWIFT中:
UIApplication.sharedApplication().presentLocalNotificationNow(notification)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
207 次 |
| 最近记录: |