【发布时间】:2015-12-04 03:19:33
【问题描述】:
要求是必须检测 iPhone 的系统时间是否被用户手动更改。为此我使用了
NSNotificationCenter.defaultCenter().addObserver(self, selector: "timeChangedNotification:", name: NSSystemClockDidChangeNotification, object: nil)
和
func timeChangedNotification(notification:NSNotification){
println("Device time has been changed...")
}
但没有得到结果。 此外,如果这个时间没有改变意味着它是网络提供的自动时间,那么必须与服务器时间进行比较。如何做到这一点?请提供相同的帮助。
【问题讨论】: