I want to fix a point (left top point) and scale (zoom out) the UIView according to the point
like this image
Now I use self.transform = CGAffineTransformMakeScale( 0.7 , 0.7);
to scale the UIView , But it only can scale the UIView according to the center point
Edit
I try to use set anchorPoint with (0,0) but the view position be wrong
使用anchorPoint属性:
self.layer.anchorPoint = CGPointMake(0.0, 0.0);
尝试设置图层container!.layer.anchorPoint = CGPoint(x: 0, y: 0)
anchorPoint container!.layer.anchorPoint = CGPoint(x: 0, y: 0)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.