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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:28:36+00:00 2026-05-26T07:28:36+00:00

I have several UIViewControllers, loaded via a UINavigationController, where I override loadView, and setup

  • 0

I have several UIViewControllers, loaded via a UINavigationController, where I override loadView, and setup a custom view to display. I am having problems with setting the frames of some of the subviews, and maybe the view itself. I think that either the UINavigationController or the UIViewController is able to force it’s view to fill the screen when displayed.

I am wondering if and/or when the size of the view is set. And if it is happening, is it setting the frame of the view, or doing it another way.

Thanks.

Update:
I have just noticed while working through this is that I make an new UINavigationController, with this loadView method:

- (void)loadView
{
  UIView *view = [[UIView alloc] initWithFrame:CGRectMake(10.0f, 10.0f, 10.0f, 10.0f)];
  [view setBackgroundColor:[UIColor redColor]];
  self.view = view;
  [view release];
}

I get a red view taking up the entire screen, except for the status bar and header. When does my view get resized to fill the screen? And what size should I use when creating the 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-26T07:28:36+00:00Added an answer on May 26, 2026 at 7:28 am

    The framespace for the UIViewControllers becomes smaller, because UINavigationController manipulates the view by adding a UINavigationBar, which is 44.0f in size.

    It gets resized because you replace the view with self.view = view; If you would have used addSubview: instead it would have stayed it’s original size. logancautrell explained when and why.

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

Sidebar

Related Questions

In my mainWindow.xib, I have this setup. 1) UINavigationController containing several viewControllers. 2) UIViewController
I am working on a project with several custom classes. I have a CardModel
I have a few custom UIViewControllers in my app which need to know the
I have a scroll view with paging control. It loads several pages according to
I have several problems relating to NSPredicates, here are they; 1.) My code is
In my app I'm implementing UINavigationController . There are several UIViewControllers that are being
Say I have two UIViewControllers , all working under a UINavigationController : RootViewController hosts
I have several dataSources I use for one UIViewController. My view controller uses KeyValue
So, I develop the app that uses sqlite3 database methods. I have several view
I have an UIViewController with several subviews in its view property ( UISearchbar and

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.