2011-09-25 85 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通過複製代碼完成。爲了實現水平漸變,多行改變了。