Add buttons to UINavigationController subclass <p>I'm trying to create reusable subclass of <code>UINavigationController</code>. So here's my code : </p> <pre><code> @interface MainNavigationController : UINavigationController ... - (void)viewDidLoad { [super viewDidLoad]; self.navigationBar.barTintColor = primaryOrange; self.navigationBar.tintColor = white; self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"search"] style:UIBarButtonItemStylePlain target:self action:nil]; self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"menu"] style:UIBarButtonItemStylePlain target:self action:nil]; } </code></pre> <p>So the problem that the color of navigation bar is changing but the buttons they doesn't appears.<br /> What's I've missed here ? </p> <p><strong>Update</strong> I want to have the same NavigationController (button and color ...) for the NavigationController in my image : <img src="https://i.stack.imgur.com/HiOu8.png" alt="enter image description here"> </p> <p><strong>Update</strong> So I've subclasse my navugationController unn this way : </p> <pre><code>-(void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated{ viewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"search"] style:UIBarButtonItemStylePlain target:self action:nil]; viewController.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"menu"] style:UIBarButtonItemStylePlain target:self action:@selector(showMainMenu)]; } - (id)initWithRootViewController:(UIViewController *)rootViewController { self = [super initWithRootViewController:rootViewController]; if (self) { rootViewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"search"] style:UIBarButtonItemStylePlain target:self action:nil]; rootViewController.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"menu"] style:UIBarButtonItemStylePlain target:self action:@selector(showMainMenu)]; } return self; } </code></pre> <p>This work's but the only problem is that when I push a view instead of having back button on left I get Always the search icon, how to fix it (I want to have search button for parent on left , and back button for child view ) ?</p>