开发者

UIView Position

开发者 https://www.devze.com 2023-02-17 14:06 出处:网络
How to detect the position of a ui开发者_如何学JAVAview after applying the CGAffineTransformRotate to it?You can set view\'s background color to check actually where view is going after transformation

How to detect the position of a ui开发者_如何学JAVAview after applying the CGAffineTransformRotate to it?


You can set view's background color to check actually where view is going after transformation. If view will be out of display area then this trick will not help you. otherwise you can calculate view's new origin using below function.

newPoint = CGPointApplyAffineTransform(initialPoint, customTransform);

pass view's origin in initial point and your transform in customtrasform

0

精彩评论

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

关注公众号