Overridden 320 style TTDefaultStyleSheet not working

I recently got three 20 built-in to my application and am trying to override the default toolbar color in TTWebController.

In TTWebController.m: 118, I see that this is the tintColor toolbar setting:

_toolbar.tintColor = TTSTYLEVAR(toolbarTintColor); 

So, I created my own stylesheet, which subclasses TTDefaultStyleSheet and overrides the TintColor toolbar

FooStyleSheet.h:

 #import <Three20Style/Three20Style.h> #import <Three20Style/TTStyleSheet.h> #import <Three20Style/TTDefaultStyleSheet.h> @interface FooStyleSheet : TTDefaultStyleSheet @property (nonatomic, readonly) UIColor* toolbarTintColor; @end 

FooStyleSheet.m:

 #import "FooStyleSheet.h" @implementation RaptrStyleSheet - (UIColor*)toolbarTintColor { return RGBCOLOR(0, 0, 0); // should override TTDefaultStyleSheet } @end 

and in my application: didFinishLaunchingWithOptions: I set the default stylesheet

 [TTStyleSheet setGlobalStyleSheet:[[[FooStyleSheet alloc] init] autorelease]]; 

but when I look at the TTWebController, it does not inherit my tintColor. If I directly edit TTDefaultStyleSheet.m:

 - (UIColor*)toolbarTintColor { return [UIColor blackColor]; } 

works as expected.

Is there something that I see that is preventing my style from being matched?

thanks,
-norm

+4
source share
1 answer

Your @property header file is not required - does this remove the solution to your problem?

0
source

Source: https://habr.com/ru/post/1308836/


All Articles