2010-11-27 8 views
0

나는 UINavigationBar와 나는UINavigationBar : 버튼 글꼴 색상

@implementation UINavigationBar (UINavigationMyToolbar) 
- (void) drawRect:(CGRect)rect { 
    self.tintColor = <UIColor>; 
} 

모든 백 버튼에 배경 색상을 변경했습니다있다하지만 대답은 어떻게 응용 프로그램에서 다시 모든 버튼의 글꼴 색상을 변경 찾을 수 없습니다? !

미리 감사드립니다.

답변

0

navigationController.navigationBar 배경색을 변경하여 단추 색을 변경할 수 있습니다.

self.navigationController.navigationBar.tintColor = [UIColor redColor]; // or whatever color you like 

오, 당신은 전체 응용 프로그램을 변경하려는 경우 AppDelegate에 didFinishLaunchingWithOptions에 그것을 배치하고 당신이 다른 컨트롤러에서 변경 해달라고, 당신이 잘되어야합니다. 각보기마다 색상이 다른 경우 각보기에 대해 viewWillAppear 또는 init에 배치하십시오.

+0

_font_ 색은 배경색이 아닙니다. – danilabagroff

+0

버튼을 무시하고 대신 UILabel을 사용한다면 yes, 그렇지 않으면 no. – WrightsCS