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

  • Home
  • SEARCH
  • 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 8646997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:57:20+00:00 2026-06-12T12:57:20+00:00

I have been checking out some posts on bounds vs frames but still a

  • 0

I have been checking out some posts on bounds vs frames but still a bit confused.

I have the following hierarchy: UITabBarController > UINavigationController > UIViewController

When I tried the following NSLog

NSLog(@"%f %f %f",[[[self tabBarController] view] bounds].size.height, [[[self navigationController] view] bounds].size.height, [[self view] bounds].size.height);

I get the following Output:

480.000000 431.000000 460.000000

I understand the 20 difference accounts for the status bar height, but I don’t understand why the UIViewController’s bound excludes the status bar height, but that for UINavigationController and UITabBarController include…

REFINING MY QUESTION

1) Why does the top tabBarController has a height of 480.0 (why doesn’t it exclude the status bar height of 20pt???). Ok, let me assume height will always NOT exclude the status bar height and move on for now

2) The UINavigationController has a height of 431.0 (ok, a reasonable guess is that it is 480-49, where 49 is the height of the tab bar). But why does it selectively exclude the height of the tab bar but NOT the height of the status bar??? Apple’s View Programming Guide doesn’t not seem to explain that… but let’s move on…

3) Why does my UIViewController has a height of 460?!

(3a) why does it exclude the 20pt height of the status bar unlike UITabBarController and UINavigationController???

(3b) AND MORE importantly, why does it NOT exclude the height of the navigation bar (i.e. why shouldn’t it be 431-44 = 387?!)

(3c) why does my UIViewController which is INSIDE my UINavigationController has a LONGER height than 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-06-12T12:57:22+00:00Added an answer on June 12, 2026 at 12:57 pm

    Kinda figured it out… I was putting the NSLog in viewDidLoad, if I move them to viewDidAppear, the height for the UIViewController was 367 (=480-20-44-49) as expected and its origin is (0, 64), which accounts for the 20pt of status bar and 44pt of the navbar

    and for the UINavigationController, even though it’s origin.y is at 0 and it has a height of 480.0, when I printed the frame for its navigationBar directly the navbar has an origin.y of 20, so basically the UINavigationController’s frame is still at the full screen but the top 20pt (where the status bar is) is empty

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

Sidebar

Related Questions

I have been checking out some info about 64-bit driver development; I found that
I have been checking out some of the possible timers lately, and System.Threading.Timer and
I have been checking out some Rogue like games (Larn, Rogue, etc) that are
I have a query I need some help with, have been checking out a
I have been checking out Groovy a bit and I feel that moving a
Have been looking on some tutorials for drawing canvas using SurfaceView, but the only
I currently use Notepad++ for most of my development. I have been checking out
Have been searching how to convert a dictionary to a string. But the results
I have been using TortoiseSVN for some time and I really like it. I
I have been trying to add columns to a table using some logic that

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.