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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:59:13+00:00 2026-05-23T02:59:13+00:00

I am building a large hierarchical iPhone application with multiple screens controlled by a

  • 0

I am building a large hierarchical iPhone application with multiple screens controlled by a UINavigationController. One of these screens is able to display content in two different formats (I toggle between them using an IB-created UITabBar), and I have constructed this screen with a view that adds a subview (loaded from a nib file) based on the active tab.

Each of these subviews contains a search bar that needs to push the navigation bar out of the way when it is tapped. The navigation bar is only accessible from the subviews’ superview’s controller, so I have added a forward declaration of the superview’s controller class to the controller of each subview. When a subview is loaded, its “superViewController” property is set.

Typically, each search bar would automatically hide the navigation bar as necessary, but I need to implement this functionality myself because the bar is in the view above the search bars. I have tried doing this by using

[self.superViewController hideNavBar];

in the

- (void)searchDisplayController:(UISearchDisplayController *)controller willShowSearchResultsTableView:(UITableView *)tableView

method, where “hideNavBar” is defined as follows in superViewController.m:

-(void)hideNavBar {
    [self.navigationController setNavigationBarHidden:TRUE animated:TRUE];
}

and I have also tried hiding the bar directly with

[self.superViewController.navigationController setNavigationBarHidden:TRUE animated:TRUE];

In both cases, the bar did not change in any way. Do I have to tell the navigation bar to update somehow? Is there a better way to implement the functionality I want?

I know that the forward declaration is working properly because I can push a new view onto the navigationViewController using

 NewViewController *newViewController = [[NewViewController alloc] initWithNibName:@"NewView" bundle:nil];
 [self.superViewController.navigationController pushViewController:newViewController animated:YES];
 [newViewController release];

Thanks in advance,
Julian Ceipek

In case it matters, the navigation bar is set to be translucent so that the subviews are underneath the bar.

  • 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-23T02:59:14+00:00Added an answer on May 23, 2026 at 2:59 am

    Have you tried using a modal view controller? Based on each selection, if you push a modal view controller onto the view it will automatically hide the navigation bar.

    http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/ModalViewControllers/ModalViewControllers.html

    Essentially it is meant to be a screen that is used to temporarily accept user data. If you implement this it will automatically hide the navigation bar when it comes into view as it is owned by the view controller that presents it and is not pushed onto the navigation controller stack.

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

Sidebar

Related Questions

I'm looking at building a Rails application which will have some pretty large tables
I am building a large application and I ususally use a simple session to
I am building a large website where members will be allowed to upload content
I'm building a large scale web application. It will grow in the future so
I am now building an application which should store and handle large amounts of
I am building a rather large web application and have built a handful of
I believe strongly in using unit-tests as part of building large multi-platform applications. We
Hey. We're building a large ASP.NET website, and have hired an external firm to
I'm building a fairly large website and my .htaccess is starting to feel a
Building a client-side swing application what should be notified on a bus (application-wide message

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.