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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:03:22+00:00 2026-05-24T04:03:22+00:00

In my App I use a UITabbarController, which rotates perfectly to all UIInterfaceOrientations in

  • 0

In my App I use a UITabbarController, which rotates perfectly to all UIInterfaceOrientations in all viewcontrollers. But when I add an UIView to the UIWindow afterwards it will not be added in the current UIInterfaceOrientation, but always in UInterfaceOrientationPortrait (which is default for the app). It won’t rotate to a new orientation also. I add the ViewController by using:

LoginViewController *loginViewController = [[LoginViewController alloc] init];
[self.window addSubview:[loginViewController view]];

I have

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return YES;
}
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
    NSLog(@"%@", @"YES IT WILL!");
}

in LoginViewController.m but there will never be logged anything. Any idea why the subview won’t rotate?

SideSwipe

EDIT:
Found the solution:
Apparently UIWindow should only have one subview, not more, otherwise things will mess up, so i call:

LoginViewController *loginViewController = [[LoginViewController alloc] init];
[tabBarController presentModalViewController:loginViewController animated:YES];

instead, which will autorotate the loginviewcontrollers view just fine.

  • 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-24T04:03:22+00:00Added an answer on May 24, 2026 at 4:03 am

    I have a view inside another view, when rotation happened, only the parent willRotateToInterfaceOrientation got called, so what I did is add [self.subViewController willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration]; to parent’s willRotateToInterfaceOrientation method.

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

Sidebar

Related Questions

You can use App.config; but it only supports key/value pairs. You can use .Net
How can I accomplish the following: When my app loads a UIView will show
My app is building purely programmatically on UITabBarController above a UINavigationController, which are both
I am building an app that uses multiple types of screens--all which warrant their
Almost every Express app I see has an app.use statement for middleware but I
if your app use this solution , do do you plan port the app
In my rails app I use the validation helpers in my active record objects
In our web-app we use PHP5.2.6 + PDO to connect to a SQL Server
In my web app I use several asmx (Web Services) from the same provider,
IN my app I use a threadpool with a custom ThreadFactory. My code looks

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.