Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的应用程序使用 ApplicationSignificantTimeChange 方法来检测设备设置的时间变化。但是,当午夜到达或运营商更新时间或更改为夏令时时调用此方法。是否可以区分通知启动的原因?
不,没有办法区分这些,但取决于你想要完成的确切 - 可能有更好的方法来做到这一点。
例如,如果您正在寻找第二天的下一刻,您可以NSCalendarDayChangedNotification在 iOS 7 上注册
NSCalendarDayChangedNotification
遗憾的是没有 - 此调用没有传递任何字典或信息。您将不得不寻找其他解决方案来实现您想要实现的目标。