2010-05-05 3 views
4

최근에 내 앱에 320이 통합되어 TTWebController에서 기본 툴바 색상을 덮어 쓰려고합니다.three20 TTDefaultStyleSheet 스타일이 작동하지 않음

TTWebController.m에서

:

:
_toolbar.tintColor = TTSTYLEVAR(toolbarTintColor); 

그래서 내가

FooStyleSheet.h toolbarTintColor을 TTDefaultStyleSheet을 하위 클래스와 우선 내 자신의 스타일을 만들어 : (118) 나는이 도구 모음의하려면 tintColor을 설정하고 있음을 볼 수

#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 
didFinishLaunchingWithOptions :

내 응용 프로그램에서 내가 내 기본 스타일 시트

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

을 설정하지만 난 TTWebController를 볼 때, 내하려면 tintColor을 상속하지 않습니다. 직접 TTDefaultStyleSheet.m을 편집하는 경우 :

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

예상대로 작동합니다.

내 스타일을 포착하는 것을 간과하고있는 것이 있습니까?

덕분에, 헤더 파일에서
이 -norm

+0

안녕 funkadelic, 질문에 대한 답변을 찾았습니까? –

답변

0

의 @property가 불필요 -이 문서가 문제를 해결하는 제거합니까?

관련 문제