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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:51:04+00:00 2026-05-24T23:51:04+00:00

I’m using the UINavigationController toolbar. Before I display it, I resize my views so

  • 0

I’m using the UINavigationController toolbar. Before I display it, I resize my views so that they don’t get blocked by the toolbar (I set the frame of the current view controller’s view to the rect spanning from the bottom of the navigationBar to the top of the toolbar.

But not all of my view controllers have toolbarItems. So, when switching from a view controller that has items (controller A) to one that doesn’t (controller B), I want to hide the toolbar. However, when I call setToolbarHidden:animated: in B’s viewWillAppear:animated: method, the toolbar animates down during the push transition and shows the UIWindow background behind it.

This also happens in the reverse direction: when transitioning from B to A (via the back button), I want the toolbar to animate in to show A’s toolbarItems again, but since A’s view doesn’t extend to the bottom of the screen, the UIWindow is visible during the pop transition.

That might not have been the best description, so here’s a screenshot:

Cmd-shift-3 rapid-fire FTW

I have tried updating A’s frame in its viewWillDisappear:animated: method, but it does strange things, since it seems to be called within the UINavigationController push animation block. Any insight would be appreciated.

Update: I tried hiding the toolbar in B’s viewDidAppear:animated: instead, but the results weren’t ideal. Using this solution, the toolbar doesn’t get dismissed until the push transition completes. Since B doesn’t have any toolbarItems, A’s items get pushed to the left during the transition, leaving an empty toolbar on the screen before it disappears. Also, when going back to A, the UIWindow background will be visible unless I set the toolbar to visible in B’s viewWillDisappear:animated:, which would mean that B has to know that A has toolbarItems.

  • 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-24T23:51:05+00:00Added an answer on May 24, 2026 at 11:51 pm

    Since I never found a satisfactory solution to this involving animation, I ended up making my views extend down behind the toolbar to avoid showing the window. If your controller’s view is a UITableView or UIScrollView, you can set its contentInset appropriately so that your content won’t get covered up by the toolbar:

    UIEdgeInsets edgeInsets = [[self tableView] contentInset];
    if (![[self navigationController] isToolbarHidden]) {
        edgeInsets.bottom = CGRectGetHeight([[[self navigationController] toolbar] frame]);
    }
    [[self tableView] setContentInset:edgeInsets];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I am using Paperclip to handle profile photo uploads in my app. They upload
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I've got a string that has curly quotes in it. I'd like to replace
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have a French site that I want to parse, but am running into
We're building an app, our first using Rails 3, and we're having to build

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.