I'm using version 1.1 of the Three20 library and I'm setting a global style sheet to change the navigationBarTintColor
in my app delegate like this:
[TTStyleSheet setGlobalStyleSheet:
[[[DefaultStyleSheet alloc] init] autorelease]];
That is working just fine, except when my app state is restored by calling restoreViewControllers
in TTNavigator
. In that case, the navigation bar is showing the iOS default, pale blue color. When I navigate on to the next view, the style sheet takes effect again.
I also posted this question on the Three20 Google Group. I'll update here if I find an answer there, of course.
In the mean time, I found a solution to this with the help of the kind people on the Three20 Google Group.
In short: The global style sheet will work correctly, if all view controllers descend from TTViewController. When inheriting directly from UIViewController, a work-around is needed to enforce the wanted behavior. Use either categories or a common super-class to implement the following method for your view controllers: