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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:15:35+00:00 2026-06-04T13:15:35+00:00

Did you notice that UINavigationBar is not set anymore when creating a UITableView, even

  • 0

Did you notice that UINavigationBar is not set anymore when creating a UITableView, even after giving it a title or a button?

Now i’m going mad on how to put a navigation bar over my UITableView. It seems really impossible. I tried to add to my tableView a subview with the Navigation Bar, but seems worthless, because when I scroll down, the navigation bar scrolls down as wellm and it shouldn’t.

Any ideas on how to implement it?

EDIT

Well, as always I went on File -> New -> File.. -> UITableView. Then i set a bit of code and when I wrote

self.navigationItem.title = @"MyTitle";
self.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque;

and tried to test on Simulator, no Navigation Bar appeared.

My init code:

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        self.title = @"TabTitle";
        self.tabBarItem.image = [UIImage imageNamed:@"img.png"];
        self.view.backgroundColor = [UIColor scrollViewTexturedBackgroundColor];

    }
    return self;
}

I can’t explain why it doesn’t appear anymore. I also tried to create a new project and import my classes from a project where the navigation bar appeared, but same result there too.

EDIT2*

The app is a tabBased application.
Here is the code took from the App delegate used to set up the tabBar.

 UIViewController *viewController1, *viewController4;
    UITableViewController *viewController2, *viewController3;
    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
        viewController1 = [[FirstViewController alloc] initWithNibName:@"First_iPhone" bundle:nil];
        viewController2 = [[Tips alloc] initWithNibName:@"Table" bundle:nil];
        viewController3 = [[Favorites alloc] initWithNibName:@"Test_iPhone" bundle:nil];
        viewController4 = [[SecondViewController alloc] initWithNibName:@"Second_iPhone" bundle:nil];
    }
  • 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-04T13:15:36+00:00Added an answer on June 4, 2026 at 1:15 pm

    You are initing an UITabBarController and set 4 UIViewControllers as the corresponding UITabbarViewControllers. Since two of them are normal UIViewControntroller and two are UITableViewController there can not be a navigation bar. You have to load the viewController where you’d like the navbar form a UINavigationController. The correct way would be (assuming vc3 is the one where you’d like the navbar):

    UIViewController *viewController1, *viewController4;
    UITableViewController *viewController2, viewController3;
    UINavigationController *vc3NavController;
    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
        viewController1 = [[FirstViewController alloc] initWithNibName:@"First_iPhone" bundle:nil];
        viewController2 = [[Tips alloc] initWithNibName:@"Table" bundle:nil];
        viewController3 = [[Favorites alloc] initWithNibName:@"Test_iPhone" bundle:nil];
        vc3NavController = [[UINavigationController alloc] initWithRootViewController:viewController3];        
        viewController4 = [[SecondViewController alloc] initWithNibName:@"Second_iPhone" bundle:nil];
    }
    

    Then load the vc3NavController instead of viewController3 as the corresponding tab.
    So you have: UITabBarController -> UINavigationController -> YourViewController

    Maybe Creating a Navigation Interface will help you too.

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

Sidebar

Related Questions

Did actually someone make already a tutorial that shows how to customize an UITableView?
Recently I have been faced with the problematics that magic_quotes provides. I did notice
I know that the title was not very intuitive, so I'll try to detail
any ideas why this is causing my app to behave poorly? I did notice
I keep getting an Notice: Undefined index: did error with this query, and I'm
Did I not get enough sleep or what? This following code var frame=document.getElementById(viewer); frame.width=100;
Did not have luck with these examples: Javascript File remove Javascript FSO DeleteFile Method
I have a session variable that I set like this: <?php $token = md5(uniqid(rand(),
While reading some programming books, I notice that the authors says that, in OOP,
Ok, i'd like to firstly make you notice that i have looked for php

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.