UINavigationController change navigation bar tint color globally and programmatically?

When you declaring your UINavigationController try this.

Up vote 0 down vote favorite share g+ share fb share tw.

This code can change color of a UINavigation bar everywhere within the application. However, I noticed that it does not change the color of the navigation bar used by UINavigationController (mine comes from a storyboard). UIColor* navBarColor = UIColor colorWithRed:arc4random()%100/100.0 green:arc4random()%100/100.0 blue:arc4random()%100/100.0 alpha:1; UINavigationBar appearance setTintColor:navBarColor; UINavigationBar appearance setBarStyle:UIBarStyleBlackTranslucent; UINavigationBar appearance setAlpha:0.7; Is there a way to access the appearance object of a UINavigationController's navigation bar?

I know how to set tints of individual controllers, but I want to have a global control over how they look. Update: This was my mistake, the code does change the color of all navbars, but it requires the root navigation controller to be covered and uncovered(for example presenting a modal view controller), then it will re-draw itself with new colors! Thank you!

Objective-c ios colors uinavigationcontroller storyboard link|improve this question edited Feb 23 at 20:26 asked Feb 23 at 20:09Alex Stone1,630422 83% accept rate.

When you declaring your UINavigationController, try this: UINavigationController *myNavController = UINavigationController alloc initWithRootViewController:myRootViewController; myNavController.navigationBar. TintColor = UIColor colorWithRed:arc4random() % 100 / 100.0f green:arc4random() % 100 / 100.0f blue:arc4random() % 100 / 100.0f alpha:1.0f.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions