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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:59:51+00:00 2026-05-28T14:59:51+00:00

In my custom view controller I override loadView to programmatically set up my view

  • 0

In my custom view controller I override loadView to programmatically set up my view hierarchy. To support auto-rotation I assign an appropriate value to the autoresizingMask property of all views in the hierarchy – except for the root view (the one that I assign to self.view). Despite this omission, resizing on auto-rotation works perfectly (it feels so good to be finally able to say this ☺). I have tested in various simulators, and also on my iPhone and iPad devices.

Does anyone know why this is the case? Is this behaviour just “luck”, or is it officially documented by Apple somewhere?

(Note: I’m asking mostly out of curiosity, please don’t tell me to “go fix it, it’s just one line of code” – I have already done so.)

  • 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-28T14:59:52+00:00Added an answer on May 28, 2026 at 2:59 pm

    autoresizesSubviews/autoresizingMask define a superview-to-subview relationship. In the case of a UIViewController that supports rotation, the controller is managing the view’s frame on rotation independent of any autoresize properties.

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

Sidebar

Related Questions

I have a table view controller with custom cells. In those cells i added
In a word, how? I have a view controller that creates a few custom
I have a custom view controller that I push onto my navigation stack as
I have a custom view controller that implements the from UITableViewDataSource and UITableViewDelegate protocols.
I've created a custom view result that inherits from ViewResult. In my controller I
The parentViewController property of UIViewController is readonly, but I am nesting custom view controllers
I have a custom view engine in ASP.NET MVC and since upgrading to RC1
I've created a custom view class and right now just want to draw an
I have a simple custom view that is connected via outlet to a NIB.
I want to write a custom view engine that returns custom text (like coma

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.