简体   繁体   中英

Fire action at specific date and time iPhone

in my Core Data model, I have an entity which has got a date attribute. For example, I'll set this date to 10/07/2011 4:00pm and I want to fire an action when current date will pass the saved date by one minute.
A local notification will be fired but I also want to fire another method to change another entity attribute's value. Is it possible to do something like this?
I've also thought to NSTimer but I've never used them... And a last question: will this action fire always even is app isn't in background or foreground?
Thank you so much!
Matteo

You can't fire an action while running in background mode other than through local notifications. To check if the date condition has been met while running in foreground, NSTimer is the way to go.

尝试查看本地通知

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM