Search code examples
objective-cuinavigationcontrolleruinavigationbarios8.4uibackgroundcolor

How to set Slidenavigationcontroller naviagtion bar color?


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


Solution

  • 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?