Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8962579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:09:31+00:00 2026-06-15T16:09:31+00:00

I have a strange bug in my app when my UI flow is as

  • 0

I have a strange bug in my app when my UI flow is as follows:

  1. The mainViewController is launched in Portrait orientation, and in turn it displays a LoginViewController with modalPresentationStyle set to UIModalPresentationFullScreen.

  2. I turn the loginViewController to landscape mode, enter credentials to login (the methods to authenticate the user are defined in the mainViewController).

  3. The loginViewController is dismissed (from the mainViewController) and a bunch of buttons are loaded onto the screen to indicate that it’s the home screen.

Now my problem is that the button positions appear as if the app were in Portrait orientation even though the app was switched to Landscape while the loginViewController was presented.

Moreoever, this happens ONLY when the modalPresentationStyle is set to UIModalPresentationFullScreen! When I present it as a form sheet or a page sheet, everything works normally (I, however, need my loginViewController to be displayed FullScreen).

So far I’ve tried manually calling the shouldAutorotate method when the loginViewController is dismissed etc., and that solves the problem but seems like a shoddy workaround rather than a fix.

I’ve also tried calling the shouldAutorotate method of the mainViewController from the loginViewController, but this changes nothing.

Any ideas on how to fix the issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:09:33+00:00Added an answer on June 15, 2026 at 4:09 pm

    Autorotation has changed in iOS 6. In iOS 6, the shouldAutorotateToInterfaceOrientation: method of UIViewController is deprecated. In its place, you should use the supportedInterfaceOrientations: and shouldAutorotate methods:

    - (BOOL)shouldAutorotate {
        return YES;
    }
    
    - (NSUInteger)supportedInterfaceOrientations {
        return UIInterfaceOrientationMaskAllButUpsideDown;    
    }
    

    Modal ViewControllers no longer get rotation calls in iOS 6: The willRotateToInterfaceOrientation:duration:, willAnimateRotationToInterfaceOrientation:duration:, and didRotateFromInterfaceOrientation: methods are no longer called on any view controller that makes a full-screen presentation over itself—for example those that are called with: presentViewController:animated:completion:.

    This answer will further explain the rotation changes in iOS 6


    [EDIT]
    Completely different way is to register for rotation events. The advantage is that all objects can register for this, not only UIViewController. This is usually done when the view loads and stopped when the view disappears (put in dealloc here). The method in the selector is called when orientation changes (here it is orientationChanged:):

    - (void)viewDidLoad {
        [super viewDidLoad];
        // Start generating device rotations and register for them
        [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(orientationChanged:) name:UIDeviceOrientationDidChangeNotification object:nil];
    }
    
    - (void)dealloc {
        // Deregister and stop generating device rotations
        [[NSNotificationCenter defaultCenter] removeObserver:self];
        [[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications];
        [super dealloc];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a strange bug in a multithreaded app: public class MyClass { private
I have a very strange bug in a shipping iPad/iPhone app that I can't
I have a strange bug with bookmark counts - if I set/inc. the bookmark
Hello I have a strange bug, when I want to trigger the orientation change
I have a strange bug. I launch a PHP Unit test Suite. At the
I have a strange bug happening in my script. I have 3 balls on
I have a very strange bug, which I believe is caused by some code
I have found what appears to be a strange bug with sqlite. I have
I have come across some strange behaviour, and I'm assuming a bug in Firefox,
I have discovered a strange bug with my WPF application and I am trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.