开发者

How works anchorPoint - UIImageView

开发者 https://www.devze.com 2023-02-01 13:42 出处:网络
I wanna make a rotation around a point but NOT a point into my UIImageView. I found solution with imageView.layer.anchorPoint but when i change it, the position of my imageView change开发者_JAVA百科 t

I wanna make a rotation around a point but NOT a point into my UIImageView. I found solution with imageView.layer.anchorPoint but when i change it, the position of my imageView change开发者_JAVA百科 too. I understand why but I can't put my imageView on a definitive position and change the anchorPoint to a definitive position.

I hope I explained my problem well...

Regards, KL94


An easy way is to house your UIImageView in another UIView that is centered at the desired rotation point. Then, just rotate that UIView.

http://mohrt.blogspot.com/2009/05/rotating-view-around-arbitrary-point.html

0

精彩评论

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