Note that there are some explanatory texts on larger screens.

plurals
  1. POiPhone view shows wrong orientation
    primarykey
    data
    text
    <p>I'm wrestling with this problem. I need a portrait view and a landscape view for my App. Now when I create 2 buttons that show me a portrait view and a landscape view (forced by shouldAutorotateToInterfaceOrientation) they show up just fine. But when I call the views from within the result code of an imagepicker, the portraitview works just fine, but the landscape view get returned like this. <a href="http://bit.ly/bfbobc" rel="nofollow noreferrer">http://bit.ly/bfbobc</a>.</p> <p>So just the make it clear: the nob is already turned 90 degrees, the imageviewcontrol is only shown half (the right part is off-screen)... But the iPhone isn't forced into landscape mode...</p> <p>Can someone please explain me what's going on here or how I can achieve this! Any help is welcome!</p> <p>This is how I call the views from withing the imagepickercontroller result code.</p> <p>`- (void) imagePickerController:(UIImagePickerController *)vcImagePicker didFinishPickingMediaWithInfo:(NSDictionary *)info { NSLog(@"The picture was taken/chosen, now we need to decide which view to present");</p> <pre><code>[vcImagePicker dismissModalViewControllerAnimated:YES]; UIImage *chosenPicture = [info objectForKey:@"UIImagePickerControllerOriginalImage"]; if (chosenPicture.size.width &gt; chosenPicture.size.height) { NSLog(@"pic is in landscape"); EditLandscapeScreen *vcEditLandscapeScreen = [[EditLandscapeScreen alloc] initWithNibName:@"EditLandscapeScreen" bundle:nil]; vcEditLandscapeScreen.ChosenImage = chosenPicture; [self.view addSubview:vcEditLandscapeScreen.view]; [vcEditLandscapeScreen release]; } else { NSLog(@"pic is in portrait"); EditPortraitScreen *vcEditPortraitScreen = [[EditPortraitScreen alloc] initWithNibName:@"EditPortraitScreen" bundle:nil]; vcEditPortraitScreen.ChosenImage = chosenPicture; [self.view addSubview:vcEditPortraitScreen.view]; [vcEditPortraitScreen release]; } </code></pre> <p>}`</p>
    singulars
    1. This table or related slice is empty.
    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.
    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