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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T23:59:14+00:00 2026-05-16T23:59:14+00:00

My universal app is a single full screen view. Pressing a button flips to

  • 0

My universal app is a single full screen view. Pressing a button flips to reveal a settings page:

- (void) showSettings
{
FlipsideViewController * flipsideVC = [FlipsideViewController alloc];

NSString * settingsNib;
if ( isIPad() )
    settingsNib = isCurrentlyPortrait() ? @"settings_iPad_portrait" : @"settings_iPad_landscape";
else
     settingsNib = @"settings_iPhone";

[flipsideVC initWithNibName: settingsNib
                     bundle: nil ];

flipsideVC.delegatePointingToMainVC = self;

flipsideVC.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;

[self presentModalViewController: flipsideVC 
                        animated: YES ];

[flipsideVC release];
}

and the settings page invokes the delegate method: I recreate the main view in light of the changed settings, and flip back.

- (void) settingsDidQuit:(FlipsideViewController *) flipsideVC 
{
[self createOrRecreateWheelView];
[self dismissModalViewControllerAnimated: YES];
}

But what if the user rotates the iPad on the settings page? Apple decrees that my app must handle this. But how to do this? can I dynamically load a new XIB for the settings page?

I can’t see a way to do that, so my attempted solution is to catch the rotation within the settings view, …

- (void) didRotateFromInterfaceOrientation: (UIInterfaceOrientation) oldInterfaceOrientation 
{
[self.delegatePointingToMainVC settingsOrientationChanged]; 
}

…and call back to the main view controller, which dissolves the settings view controller and recreates it in light of the current orientation.

- (void) settingsOrientationChanged
{
[self dismissModalViewControllerAnimated: YES];
[self showSettings];
}

There is a trivial problem straight away — didRotateFromInterfaceOrientation gets triggered automatically when the settings page loads. I can prevent this by setting a boolean to false in init, and modifying thus:

- (void) didRotateFromInterfaceOrientation: (UIInterfaceOrientation) oldInterfaceOrientation 
{
if (initialized)
    [self.delegatePointingToMainVC settingsOrientationChanged]; 

initialized = true;
}

problem with this approach is that I navigate to the settings page, rotate the device, and it momentarily shows the correct settings page, before flicking back to my main view.

I think there is a threading problem here. But maybe my whole approach is wrong. Can somebody suggest a better solution?

  • 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-05-16T23:59:14+00:00Added an answer on May 16, 2026 at 11:59 pm

    I’m not sure I understand the problem. You want the settings view (loaded from NIB) to autorotate? You should just return YES for the orientation you want the autorotation to be performed in the shouldAutorotateToInterfaceOrientation: and set the autoresizing mask of the views inside the XIB accordingly to your needs.

    There’s no need to call back the main view controller and tell him to push a new settings view controller. The rotation behavior of the views is determined by the autoresizing mask properties of each view and the implementation of shouldAutorotateToInterfaceOrientation: method of the associated view controller and just that. If want to do more advanced animations, though, you can set up and manage them in the willRotateToInterfaceOrientation:duration: and didRotateFromInterfaceOrientation: methods.

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

Sidebar

Related Questions

My universal app has a settings page, wherein the user must choose a theme
I created a single view universal app, and made sure that the method shouldAutorotateToInterfaceOrientation
I have a universal app. On the iPad, when pressing an annotation pin it
Possible Duplicate: Merging existing iPhone and iPad app ids into a single universal app
I am using the latest Xcode and i created a view based universal app
In a universal app, I have a UIView which is presented inside an iPhone-Screen-Sized
I am having universal app. And i want to to display splash screen with
in my universal app, I have a UIControl View inside of a UIScrollView. On
Trying to get my Universal app released and I rely on AdMob ads for
In a universal app, you have to add 6 splash images named Default.png. 320

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.