I am using a TTPhotoViewController subclass from the Three20 library for showing images from a web location. The images load up fine but the navigation bar and toolbar show up with the default tint. I am using a nav bar with a custom tint (set in the MainWindow.xib)
I tried these things to get it to show black translucent bars but none of these seem to work.
Can someone please tell me why this would happen and how I can solve this? Thanks.
EDIT: I'm an idiot. You're trying to set the style, not the color. The below is all valid information, but what you almost certainly want is the navigationBarStyle
property defined by TTViewController
. Sorry.
Three20 has a "style sheet" mechanism built into it, the intended purpose of which is to save you from having to set tint colors, fonts, etc. on all of the many UI objects in your app, over and over. However, if you don't know it's there, you end up in exactly this situation. What you need to do is:
Create a subclass of TTDefaultStyleSheet
in your application, and override at least this method:
- (UIColor*)navigationBarTintColor {
return RGBCOLOR(119, 140, 168);
}
Someplace in your app (probably applicationDidFinishLaunching:
), call:
[TTStyleSheet setGlobalStyleSheet:
[[[YourStyleSheetClass alloc] init] autorelease]];
(You might want to browse around in TTDefaultStyleSheet.h
, because there are a whole pile of other styles defined there that are used by the framework, and that you might also want to override.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With