【发布时间】:2015-08-28 07:51:21
【问题描述】:
我想固定一个点(左上点)并根据点缩放(缩小)UIView
喜欢这张图片
现在我使用self.transform = CGAffineTransformMakeScale( 0.7 , 0.7);来缩放 UIView ,但它只能根据中心点缩放 UIView
编辑
我尝试使用 set anchorPoint with (0,0) 但视图位置错误
【问题讨论】:
-
您在寻找
anchorPoint吗? -
view.layer.anchorPoint,设置为 0,0
-
@luk2302 我更新了我的问题
-
您需要的不仅仅是更改锚点:hackingwithswift.com/example-code/calayer/…
标签: ios swift cgaffinetransform