我正在使用UNUserNotificationCenter进行应用程序开发。
我想在UNUserNotificationCenter打开之前对UNUserNotificationCenter应用一个函数,并从该函数获取数据。
我认为将我为闹钟设置的时间与每个固定时间的计时器进行比较是不准确和不准确的。
要让函数在某个时间运行,应该使用什么方法?
发布于 2017-01-20 11:43:25
我想你可以这样做:Swift - using timers/system clock/background threads to do something in my application every hour只需使用UNUserNotificationCenter即可。您可以在此处找到更多说明:https://developer.apple.com/library/prerelease/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/index.html#//apple_ref/doc/uid/TP40008194
祝好运!
https://stackoverflow.com/questions/41754842
复制相似问题