0
votes

i have situation where i need to have blue color as navigation bar color for first view and for second view i should have as green color .when i tried to apply it using below code.

in viewdidload for 1st view: self.navigationController.navigationBar.barTintColor = [UIColor bluecolor];

in view did load in second view: self.navigationController.navigationBar.barTintColor = [UIColor greenColor];

the color remains same as in first view i was unable to change it,and how to remove glassy effect on navigation bar.

1
Does stackoverflow.com/q/26256149/643383 answer your question? Also, it's not clear what you mean by glassy effect, but UINavigationBar has a translucent property that you can set to NO.Caleb
Try to put your code in the viewDidAppearAshraf Tawfeeq
i have place in viewdidappear but result is same .i was unable to change coloruser3816512

1 Answers

0
votes

Select your navigation controller in your view hierarchy(in Storyboard), select the navigation bar and from there you can set the color in the attributes inspector.