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 8266197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T05:04:15+00:00 2026-06-08T05:04:15+00:00

I have a UISplitViewController that is set at the rootView of my application. When

  • 0

I have a UISplitViewController that is set at the rootView of my application. When viewDidLoad is called in my left view controller I do a check, then present a modal view controller using the following:

SiteConfiguration *config = [[SiteConfiguration alloc] initWithStyle:UITableViewStyleGrouped];
config.firstLoad = YES;
UINavigationController *configNav = [[UINavigationController alloc] initWithRootViewController:config];
if ([Utility isIpad]) {
    configNav.modalPresentationStyle = UIModalPresentationFormSheet;
    configNav.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
    [[AppDelegate instance].splitViewController presentModalViewController:configNav animated:YES];
} else {
    [self presentModalViewController:configNav animated:YES];
}

If the iPad is in landscape mode while the app loads, the modalView is shown with an incorrect orientation:

enter image description here

I can rotate the iPad to fix this, but WHY does it load up wrong? I have shouldAutorotateToInterfaceOrientation: returning YES in my SiteConfiguration viewController. What could be causing this?

  • 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-08T05:04:17+00:00Added an answer on June 8, 2026 at 5:04 am

    Be careful of where you choose to present your modal controller.
    I’ve had experience with some custom modal controllers and setting the orientation of the modal controller (and its shadows!) in

     - (void)viewDidLoad:(BOOL)animated 

    didn’t always behave as expected.

    Put your code (presentModalViewController:configNav animated:YES) in

     - (void)viewDidAppear:(BOOL)animated 

    instead. (Do this as well with any code that sets a subviews frame or does any manipulation of layers, e.g. the shadow layer and shadow properties).

    As far as I can tell, the rotation may not be apparent to subviews of the rotated view until after

     - (void)viewDidLoad:(BOOL)animated 

    due to threading issues (one thread may start drawing your subview or modal controller’s view before rotation is passed down to the subviews (and modal controllers) by the main thread). Someone with more experience with threads than myself might be able to shed more light on this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UISplitViewController with the master view set up like this: UITabBarController Tab1:
I have a UISplitViewController that is set up like so: -(IBAction)makeStory:(id)sender{ NSLog(@makeStory:); makeStoryTableViewController =
I have rotation problem on UISplitViewController . In my case, after calling present modal
I have a UISplitViewController with a UITableView on the left and a custom view
I have this button on the leftside of my UISplitViewController (RootViewController) that has a
I have seen several apps that make use of a UISplitViewController inside a tab.
I have 4 UIBarButtonItems inside a UISplitViewController's right hand side (the detail controller). I'm
I am working on UISplitViewController, I have a pageController in my detail view of
I have the following setup: A subclass of UISplitViewController that creates the master and
I am developing for iPad and have created a standard UISplitViewController application using the

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.