在我的应用程序中,如果用户空闲一段时间,我想调用注销功能如何完成
这个答案对我不起作用 iPhone: Detecting user inactivity/idle time since last screen touch if i subclass my app delegate class from UIApplication and implementation
- (void)sendEvent:(UIEvent *)event
它给了我错误
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'There can only be one UIApplication instance.'
我在我的应用程序中找不到 UIApplication 的另一个实例
到目前为止我已经完成了
代替
@interface IdleAppDelegate : NSObject <UIApplicationDelegate> {
我已将其更改为
@interface IdleAppDelegate : UIApplication<UIApplicationDelegate> {
并且主要是
int retVal = UIApplicationMain(argc, argv, nil, nil);
我已将其更改为
int retVal = UIApplicationMain(argc, argv, @"IdleAppDelegate", @"IdleAppDelegate");
还有什么事情要做吗?
我收到上述错误...我错过了什么...?
请帮忙
谢谢