3
votes

Refer to the following, short video: http://screencast.com/t/cmnsqVTh

The problem is with the color of a navigation bar's back button.

The first time I load the app, the navigation bar + its buttons have the default color. I then push a view controller on the stack, and when the new view loads (in the viewDidLoad method), it sets the navigation bar's tint color to pink. The nav bar's buttons are also pink as expected. I then press the back button, and the view is popped from the stack. On the root view controller's viewWillAppear method I set the tint color back to nil so that it's the default color again. The navigation bar looks as expected. However if I push the view controller on the stack yet again, the navigation bar's tint color is pink, but the back button's color is the default light blue. Hope that was understandable.

So what's the cause of the problem?

3

3 Answers

2
votes

Sample project: http://www.filedropper.com/testnavigation

The error seems to occur with 3.0 devices/simulator. Does not occur with 2.2.1. Wasted so much time on this...

Bug report has been filed (7001347)

1
votes

When I upgraded to SDK 4 this magically fixed itself.

0
votes

Did you try putting your code in the viewWillAppear method and not viewDidLoad, for the controller that you want to push on the stack ?

Other guess, did you try setting the color, when poping the controller and displaying the root controller, to another color than nil ?