I am working on iPad App in Ios6, There when we click the right bar button i am giving an action like below:
-(IBAction)camerabuttonAction:(id)sender
{
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.delegate = self;
self.popoverController = [[UIPopoverController alloc] initWithContentViewController:picker];
[self.popoverController presentPopoverFromRect:CGRectMake(50, -250, 500, 300) inView:appDelegate.splitview.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];
}
My problem is, When i am in Land scape mode if i click the button. The camera show in portrait mode(Image appears in reverse mode to see) after every second use. But, if i shake the iPad then it shows in LandScape i.e, in correct direction .
see the below images
When i am in Land scape mode if i click the button camera shows the image like below:
if i shake the iPad then camera shows the image like below:
I have tried a lot and googled,but I did not find any solution. It's killing my time so if any one have worked on it please guide me and post sample code.
I faced the same issue in my project i have tried the below and works for me
My code:
Please try this
I have an ipad app only lanscape mode, I was freaking out because I read all these posts but I used this very simple code to take a picture and it works perfectly for my only lanscape app. Important I don´t choose an image from the library, I just take the picture and use it to put it over an other image, it works for me perfectly.
I'm going to try a good guess here because I haven't done this myself...
Have you tried to create a subclass of UIImagePickerController and implement the methods of the interfaceOrientation from the ViewController (which is the super class)?
You can try giving transform to your imagePickerController
I study about your issue in Google search and got some result or possibility like bellow point:-
result 1
some Answer say's that its a iOS 6 bug so you can not fixed It like bellow Quetion:-
iPad camera popover preview wrong rotation and scale
result 2
I don't think we can control orientation of camera.Camera orientation property is inbuilt,which changes with orientation of device.
iPad camera orientation portrait mode?
result 3
you can manage Scaled live iPhone Camera view in center physically move the picker frame. by Bellow code:-
hope you got actually solution. about this bug or issue