开发者

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

开发者 https://www.devze.com 2022-12-21 06:39 出处:网络
The following code: http://pastie.org/pastes/835022 in a custom UIView rotates the entire view including the gradient 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

精彩评论

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