开发者

How do you rotate a Polygon in an UIView without rotating the background

The following code:

http://pastie.org/pastes/835022

in a custom UIView rotates the entire view including the gradient background.

W开发者_如何学Pythonhat is the proper way to rotate the polygon without rotating the background?


I'd separate your gradient from your polygon. Create a gradient layer for the gradient. Put your polygon drawing into the content layer. That should let your polygon be rotated without affecting the background.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜