Tag: uiapplicationdelegate

在applicationDidEnterBackground之前显示一个视图或启animation面(避免活动视图截图)

我的应用程序中有机密信息,因此当应用程序即将移至背景时,我想用启animation面将其隐藏起来。 我确实在iOS6上运行应用程序。 我试图在applicationWillResignActive显示视图,但问题是它甚至在用户滑动控制面板时显示启animation面。 我只希望它显示只有当应用程序被移动到后台。 我试图在applicationDidEnterBackground显示我的splashScreen,但是它在animation之前在恢复时显示信息。 在这里,我想要的精神: – (void)applicationDidEnterBackground:(UIApplication *)application { [_window addSubview:__splashController.view]; }

iPhone GPS在后台暂停后不会恢复

我的应用程序需要跟踪用户在后台的位置变化,只要用户移动,就可以正常工作。 当用户停止并且CLLocationManager在10-20分钟左右之后暂停时。 这是通知: -(void)locationManagerDidPauseLocationUpdates:(CLLocationManager *)manager{} 这对我也很好。 太好了,我省了一些电池等等 问题是,当用户开始再次移动时, CLLocationManager永远不会被唤醒, 直到我将应用程序放到前台 (获取活动状态) 之前 ,下面的委托方法才会被触发 : //Never called back after CLLocationManager pauses: -(void)locationManagerDidResumeLocationUpdates:(CLLocationManager *)manager{} -(void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations{} 为什么在设备重新开始移动之后, locationManagerDidResumeLocationUpdates从来不会被调用? GPS不应该自动恢复(自动暂停)? 有没有用户的交互恢复GPS的方法? 应用程序在Info.plist文件中声明如下: 我的CLLocationManager设置是: locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; [locationManager setActivityType:CLActivityTypeFitness]; //I WANT pauses to save some battery, etc… That is why following line […]

目标C iPhone开发中的“委托”是什么?

目标C iPhone开发中的“委托”是什么?