Getting "Using two-stage rotation animation" warning with UIImagePickerController

iphone, uiimagepickercontroller

Solution

This message will appear if you are presenting the `UIImagePickerController` within another `UIViewController`. Because it isn't pushed like a `UINavigationController` stack, there is confusion at the `UIWindow` level. I don't know if the warning is a problem, but to eliminate the warning you can do the following:

// self = a UIViewController  
//  

- (void) showCamera  
{  
    cameraView = [[UIImagePickerController alloc] init];  
    [[[UIApplication sharedApplication] keyWindow] setRootViewController:cameraView];  
    [self presentModalViewController:cameraView animated:NO];  
}   

- (void) removeCamera  
{  
    [[[UIApplication sharedApplication] keyWindow] setRootViewController:self];  
    [self dismissModalViewControllerAnimated:NO];  
    [cameraView release];  
}  

Problem

I wrote simple code to test UIImagePickerController: ``` @implementation ProfileEditViewController - (void)viewDidLoad { [super viewDidLoad]; photoTaker_ = [[UIImagePickerController alloc] init]; photoTaker_.delegate = self; photoTaker_.sourceType = UIImagePickerControllerSourceTypeCamera; photoTaker_.showsCameraControls = NO; } - (void)viewDidAppear: (BOOL)animated { [self presentModalViewController: photoTaker_ animated: NO]; } @end ``` And I'm getting strange warnings like the following: 2010-05-20 17:53:13.838 TestProj[2814:307] Using two-stage rotation animation. To use the smoother single-stage animation, this application must remove two-stage method implementations. 2010-05-20 17:53:13.849 TestProj[2814:307] Using two-stage rotation animation is not supported when rotating more than one view controller or view controllers not the window delegate Got any idea what this is about? Thanks a lot in advance!

Original source

Related problems