开发者

Three20 horizontal gradient

开发者 https://www.devze.com 2023-04-08 10:46 出处:网络
How can I make horizontal gradient for TTStye? - (TTStyle *) myStyle: (UIControlState)state { return [TTShapeStyle styleWithShape:[TTRectangleShape shape] next:

How can I make horizontal gradient for TTStye?

- (TTStyle *) myStyle: (UIControlState)state {
  return [TTShapeStyle styleWithShape:[TTRectangleShape shape] next:
          [TTLinearGradientFillStyle styleWithColor1:RGBCOLOR(60, 60, 60)
                                              color2:RGBCOLOR(30,开发者_运维技巧 30, 30) next:nil]];
}

makes Vertical gradient.

Maybe there is some tutorial on Three20 TTStyle's?


Done by copy-past code from TTLinearGradientFillStyle. Several lines changed for achieve horizontal gradient.

0

精彩评论

暂无评论...
验证码 换一张
取 消