Reputation: 20068
I am using UIApplicationSignificantTimeChange
to determine when the day has changed, but unfornatelly this event is called on multiple occasions, for example when time zone is changed.
Anyone has an idea of any methods to exactly determine that the day has changed ?
Upvotes: 1
Views: 94
Reputation: 7283
You can listen for NSCalendarDayChangedNotification
notification.
A notification that is posted whenever the calendar day of the system changes, as determined by the system calendar, locale, and time zone.
More can be found here: https://developer.apple.com/documentation/foundation/nscalendardaychangednotification
Upvotes: 2