3

In videDidLoad I have code that setup navigation bar in Detail view controller

UIImage *emptyImage = [UIImage new];

[self.navigationController.navigationBar setBackgroundImage:emptyImage forBarMetrics:UIBarMetricsDefault];

self.navigationController.navigationBar.shadowImage = emptyImage;    

self.navigationController.navigationBar.tintColor = [UIColor greenColor];

This detail view will show as detail in split view controller and push to navigation stack in smaller device, so I use show detail segue in this case.

In split view controller this detail view controller show navigation bar as transparent with correct tint color, but in iPhone navigation bar not follow my setup and show as default color and style.

Do you know how to make this work. I guess its because internal process that remove navigation controller before push into navigation stack in smaller device.

sarunw
  • 8,036
  • 11
  • 48
  • 84

1 Answers1

0

Did you try this ?

UINavigationController *lc_navigationController = (UINavigationController *)self.splitViewController.viewControllers.firstObject;
lc_navigationController.navigationBar.barTintColor = [UIColor greenColor];
Bejil
  • 412
  • 5
  • 18