0
大家使用下面的代码后台任务,它工作正常,当iPhone与Xcode的连接,但是当我跑不连接的Xcode的应用程序,那么后台任务将无法正常工作后台任务只运行
- (void)applicationDidEnterBackground:(UIApplication *)application
{
back=1.0f;
NSAutoreleasePool *pool=[[NSAutoreleasePool alloc] init];
NSRunLoop *runLoop=[NSRunLoop currentRunLoop];
timer=[NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(changeCounter) userInfo:nil repeats:YES];
[runLoop run];
[pool release];
}
请帮助为什么发生这种情况