0

I'm working on iOS app with slidenavigationcontroller, I integrated the viewcontroller for the side menu and everything works fine.But the navigationbar background color not changing.The code I used to set background color for navigation bar background.

[SlideNavigationController sharedInstance].navigationBar.backgroundColor = [UIColor redColor];

It shows color as hidden as below

enter image description here

What I'm doing wrong ?Is there any specific way for slidenavigationcontroller.Please anybody help to fix this.Thanks

iniyan
  • 131
  • 3
  • 15

1 Answers1

2

Try this.

[[UINavigationBar appearance] setBarTintColor:myColor];
[[UINavigationBar appearance] setTranslucent:NO];

For more details ,you can refer following links :

1)How to change UINavigationBar background color from the AppDelegate

2)Set background color for UINavigationBar

3)Setting the background color of UINavigationBar has no effect?

Community
  • 1
  • 1
Hardik Shekhat
  • 1,680
  • 12
  • 21