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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:27:06+00:00 2026-05-31T01:27:06+00:00

Apple’s docs say: Note: Because the amount of space available for the custom view

  • 0

Apple’s docs say:

Note: Because the amount of space available for the custom view can vary
(depending on the size of the other navigation views), your custom view’s
autoresizingMask property should be set to have a flexible width and height.
Before displaying your view, the navigation controller automatically
positions and sizes it to fit the available space.

That’s great, except … I need to know the size UINavController will use BEFORE the view is added to the frame, because the content I’ll be displaying is different depending on the size.

This is inside the “loadView” method of a UIViewController that’s being added to the UINavigationController.

  • 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-31T01:27:07+00:00Added an answer on May 31, 2026 at 1:27 am

    Well, technically you shouldn’t be sizing your subviews in the loadView method. I don’t use nibs, and in almost all of my view controllers the loadView is really small: self.view = [[UIView alloc] init];. Then, in viewDidLoad I add all my subviews to self.view. Finally, I do all of my resizing in viewWillAppear, because at that point self.view will be the appropriate size.

    If you must size views in the loadView method, you’ll have to calculate out the dimensions manually…i.e: find out the orientation of the device (self.interfaceOrientation) determine the screen size, subtract out whatever other elements you think are on screen (like a Navigation bar, etc). But this method is not recommended.

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

Sidebar

Related Questions

Apple wants me to give the user a friendly apology if I can't find
Apple seems to say that this image should have no extension. But how is
Apple guy tried to be funny and wrote in the docs: (Headphone, Speaker, etc.)
Apple's multithreading docs don't list NSIndexPath as threadsafe or not! As an immutable class,
Apple says I can register up to 100 devices to distribute an application. Is
Apple demands that the features sold on In App Purchase are available for all
Apple annonced Shake API in iPhone SDK 3.0. I can not find any information
Apple says in the NSFetchedPropertyDescription class reference: Note, however, that unlike a playlist a
Apple has extremely comprehensive documentation, but I can't find any documentation for the function
Apple has provided an example the View Controller Programming Guide, for creating an UITabBarItem,

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.