I’d like to execute my method at midnight, but I haven’t idea how to do this correctly. Check time every minute and if current time is equal 23:59 run method looks stupid. Calculate time interval from now to midnight and set it as parameter to nstimer?
Can you help me with this problem?
UPDATE:
Sorry, guys, I forgot one thing about this: method have to run background without any user notification.
You can use Local Notification:
To detect when app opened from notification, you need to implement in your App Delegate these methods:
hope this helps.
AFTER YOUR EDIT:
You can use
[NSTimer ScheduleTimerWith.....]method.