问题描述
我正在开发iphone应用程序,其中有一个部分,用户可以在该部分中及时声明他的任务及其发生的情况.IE.递归任务.该任务将仅在其到期时间显示一个警报框,而不会显示其他任何内容.这只是一种提醒,而不是真正的任务计划程序.
I am developing an iphone app, there's a section in it where user can declare his task and its occurence in time.I.e. recursive task. The task will only show an alert box and nothing else when its due time.Its a kind of reminder, rather than a real task scheduler.
用Objective-C达到最佳效果的最佳方法或技术是什么,尤其是在iPhone上.我还考虑了与iphone日历的某种集成(如果不是很耗时的实现).让该应用创建自己的日历会很好.
What's the best way or technology to achieve that with objective-c, particularly on iphone.I was also thinking, if not too time consuming to implement, about some kind of integration with iphone calendar. Would it be nice to have the app create its own calendar.
谢谢
推荐答案
我认为这是一种很好的使用方法.您可以定义对象及其选择器,以便在一段时间后,计时器将调用类似 [targer performSelector:aSelector];
I think this is one of the good methods to use. You can define the object and its selector so that after a period of time, the timer will call something like [targer performSelector:aSelector];
+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)seconds target:(id)target selector:(SEL)aSelector userInfo:(id)userInfo repeats:(BOOL)repeats
这篇关于在iPhone中安排任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!