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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:28:22+00:00 2026-06-18T12:28:22+00:00

My app has a custom navigation bar that is 59 (virtual) pixels tall, as

  • 0

My app has a custom navigation bar that is 59 (virtual) pixels tall, as opposed to the 44 pixels of the standard Apple UINavigationController UINavigationBar. I’m applying the styling to the bar with the following call during app startup:

UIImage *navBarImage = [UIImage imageNamed:@"navigation-bar.png"];
[[UINavigationBar appearance] setBackgroundImage:navBarImage
                                   forBarMetrics:UIBarMetricsDefault];

The problem this leads to is that it’s basically an image slapped on top of the screen at the origin of the standard navigation bar. The underlying navigation bar has no idea that its size has changed. This makes the content views (the view pushed onto the navigation stack) show up 15 pixels under the custom bar.

I couldn’t find a way of changing the size and position of the UINavigationController’s navigation view.

What is the most elegant way of accounting for this customization? The following (not elegant) works, BUT because the operations are applied after the view has been rendered, the shift in position and resizing is very visible to the user and looks quite amateurish:

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];

    CGRect frame = self.view.frame;
    self.view.frame = CGRectMake(frame.origin.x, frame.origin.y + 15, frame.size.width, frame.size.height - 15);
}

All of the controllers pushed onto the navigation stack are in a subclass of UIViewController that implements the method above.

Thanks a bunch!

  • 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-18T12:28:23+00:00Added an answer on June 18, 2026 at 12:28 pm

    I know this is old, but since you never got an answer, I thought I might post how I solved this issue.

    I posted a similar question but had another problem in addition to yours. I was pointed to a question on how to set the height of a UINavigationBar, and the top answer worked perfectly for me. The user suggests creating a custom UINavigationBar category and overriding the -sizeThatFits method. It solves the problem of your app not recognizing the increased height of the UINavigationBar and also an additional problem of views in the UINavigationBar not being clickable below the default 44px bottom line.

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

Sidebar

Related Questions

My app has a custom background for the navigation bar. So i made a
I am creating a custom membership provider for a web app that already has
I have an app that main layout is a custom top bar (with actions
I have an app that has a UINavigationController that pushes a UITabBarController into view.
I have a universal iOS app with a custom view that has three buttons,
I made an app that has custom notifications, but I cant remove them no
I have a navigation app that has a section where you define your search
My app has a custom object that contains an NSDate. I want to change
I am creating a reference app which has a navigation bar at the top
UNIQLO's new alarm app has a custom UIDatePicker : And I want to create

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.