UIImagePickerController:忽略拍照请求; 相机尚未准备好

Nil*_*upe 5 camera ios4

我在我的应用程序中使用相机.

我想在3秒后自动拍照.代码工作绝对正常接受一个案例..

如果应用程序进入后台,而摄像机勾选正在通过任何方式进行,如果呼叫进入中间或用户按下主页键...然后当应用程序恢复时它不会继续摄像机打勾并且在控制台中它会发出此警告

UIImagePickerController:忽略拍照请求; 相机尚未准备好.

当这样的事情发生时,我想重新启动相机我该怎么办?

nam*_*-it 0

我们可以使用这些应用程序委托函数

- (void)applicationWillResignActive:(UIApplication *)application
{
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

- (void)applicationDidBecomeActive:(UIApplication *)application
{
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
Run Code Online (Sandbox Code Playgroud)