Three20 style 设置的一些例子

需要的前置知识:

http://mattvague.com/three20-stylesheets-tutorial

http://mattvague.com/three20-tttableitem-tutorial

 

如何改变导航栏 颜色:

可以直接改:

self.navigationBarTintColor = [UIColor blackColor];

在于,每个页面都得改一遍。

 

也可以使用全局的style sheet:

-(UIColor *) navigationBarTintColor {

return RGBCOLOR(20, 20, 30);

}

 

设置LauncherView item的字体和颜色:

- (TTStyle*)launcherButton:(UIControlState)state {

return

[TTPartStyle styleWithName:@"image" style:TTSTYLESTATE(launcherButtonImage:, state) next:

[TTTextStyle styleWithFont:[UIFont systemFontOfSize:11] color:RGBCOLOR(0, 0, 0)

minimumFontSize:11 shadowColor:nil

shadowOffset:CGSizeZero next:nil]];

}

 

设置tabBar的背景色:

- (TTStyle*)tabBar {

return

[TTLinearGradientFillStyle styleWithColor1:[UIColor colorWithRed:0.737 green:0.82 blue:0.906 alpha:1.0]

color2:[UIColor colorWithRed:0.859 green:0.894 blue:0.929 alpha:1.0]

next:nil];

}

 

 

 

 

 

posted @ 2011-05-23 13:47  hjtc  Views(838)  Comments(0Edit  收藏  举报