2011-09-25 62 views
0

如何为TTStye制作水平梯度?Three20水平梯度

- (TTStyle *) myStyle: (UIControlState)state { 
    return [TTShapeStyle styleWithShape:[TTRectangleShape shape] next: 
      [TTLinearGradientFillStyle styleWithColor1:RGBCOLOR(60, 60, 60) 
               color2:RGBCOLOR(30, 30, 30) next:nil]]; 
} 

使垂直渐变。

也许有关于Three20 TTStyle的一些教程?

回答

0

TTLinearGradientFillStyle通过复制代码完成。为了实现水平渐变,多行改变了。