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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:46:26+00:00 2026-05-30T15:46:26+00:00

I have a UIViewController with a xib and when ever I am allocating it,

  • 0

I have a UIViewController with a xib and when ever I am allocating it, the view and width of the UIViewController does not adjust with the orientation I am in, it is always set to portrait. Even if I am at landscape. Why is this? Here’s how I am initializing it:

PNRWebViewController *wvController = [[PNRWebViewController alloc] initWithNibName:@"PNRWebViewController" bundle:nil];

    [self.view addSubview:self.webViewController_.view];
  • 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-30T15:46:27+00:00Added an answer on May 30, 2026 at 3:46 pm

    There are a ton of reasons why this could happen. Check out the official Apple Q&A Guide on the subject:

    Why won’t my UIViewController rotate with the device?

    • The view controller does not implement this delegate method:
      (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;

    • The view controller’s UIView property is embedded inside UIWindow but alongside an additional view controller.

    • You have added your view controller’s UIView property to UIWindow as a subview, but prematurely released it soon after.

    • All child view controllers in your UITabBarController or UINavigationController do not agree on a common orientation set.

    • Overriding the -(id)init: or -(id)initWithNibName:(NSString *)nibName bundle:(NSBundle *)nibBundle method without calling super.

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

Sidebar

Related Questions

I have a view controller (derived from UIViewController not UITableViewController) containing a table view.
I have a UIViewController with a XIB and want to add programmatically another subview.
I have a UIViewController I am loading from a xib file and pushing onto
I have two NIB's ParentViewController.xib ChildViewController.xib ParentViewController.xib contains a UIView and a UIViewController. ChildViewController.xib
I have a UIViewController class MyClass that initially had no XIB, and was initialized
I have added a XIB based UIViewController to my solution and dragged some UIViews
I have a simple UIViewController that uses a XIB for its interface. As such,
I have a UIViewController that has a XIB. I don't want to get rid
In my mainWindow.xib, I have this setup. 1) UINavigationController containing several viewControllers. 2) UIViewController
I have a UIViewController with its own .xib, and I want to use a

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.