Note that there are some explanatory texts on larger screens.

plurals
  1. POImage inside camera in iPad 2 appears rotated 90 degrees clockwise
    primarykey
    data
    text
    <p>I have an app that works on landscape, already in the store, and decided to add a camera for a certain new feature in my next update. </p> <p>The camera works perfect in my iPhone 3G and iPod 4S ( i have an ipad, but it doesn't has a camera), but one of my testers with an ipad 2 reported that the image inside the camera appears rotated 90 degrees in clockwise direction ( same for the small camera icon in the button). Even if the user rotates the ipad 2 the image always mantains that rotation. Once the picture is taken it appears it's saved correct position.</p> <ul> <li>Before giving more details, any idea of why i situation like this can happen ? ( that could help me to trace the problem). I just didn't know it was possible to rotate the preview image inside the camera !, and i'm currently clueless about what can cause to produce this behavior.</li> <li>It could be something related to my view controller ?. I'm returning NO for 'UIInterfaceOrientationPortrait' and 'UIInterfaceOrientationPortraitUpsideDown'. YES for 'UIInterfaceOrientationLandscapeLeft' and 'UIInterfaceOrientationLandscapeRight'. If understand correctly it's as it should be.</li> <li>The camera implementation is pretty straightfoward, just an UIImagePickerController. After creating it, i'm adding it as subview to an specific uiview that happens to be rotated 90 degrees Clockwise ( could this be the issue ?, but if it is, why it works correctly in my other devices with camera ?!). I tried to apply a transformation ( [picker view].transform = CGAffineTransformMakeRotation(M_PI);) but it had no effect.</li> </ul> <p>By the time being i don't have an ipad 2 ( it's on it's way), but in the meantime i would like to solve the issue, or at least try to understand why it could be happening.</p> <p>Thanks in advance.</p> <p>Cheers !</p> <p>Here's the code for the view controller method where i handle the rotation:</p> <pre><code>- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation if(interfaceOrientation == UIInterfaceOrientationLandscapeLeft) { return YES; } else if(interfaceOrientation == UIInterfaceOrientationLandscapeRight) { return YES; } else if(interfaceOrientation == UIInterfaceOrientationPortrait) { return NO; } else if(interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) { return NO; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload