I have an app that runs only in landscape mode. When i present the camera to take a picture it shows the screen as landscape but the live preview is rotated. When i take a picture the still preview is correct.
I tried to rotate the camera image with this:
self.navigationController.navigationBarHidden=YES;
UIImagePickerController *picker=[[UIImagePickerController alloc] init];
picker.delegate=self;
picker.sourceType=UIImagePickerControllerSourceTypeCamera;
picker.showsCameraControls=YES;
[picker setCameraFlashMode:UIImagePickerControllerCameraFlashModeOff];
CGAffineTransform transform=picker.view.transform;
transform= CGAffineTransformMakeRotation(-90*M_PI/180);
[picker setCameraViewTransform:transform];
[self presentModalViewController:picker animated:YES];
[picker release];
Now i get the live preview the right way round but a small viewing area (possibly because) it's view is in portrait?). Again the still preview is correct.
How do i fix this?