太简单的frame动画就不说了
右上角更多 view 缩放
_moreView.layer.position = CGPointMake(_moreView.frame.origin.x + _moreView.frame.size.width *.8,_moreView.frame.origin.y);
_moreView.layer.anchorPoint = CGPointMake(.8, 0);
if (sender.selected) {
_moreView.transform = CGAffineTransformMakeScale(1, 1);
} else {
_moreView.transform = CGAffineTransformMakeScale(.5, .5);
}
`position` 默认 view.center
`anchorPoint` 根据此点缩放 默认(0.5,0.5)
`position`是layer中的`anchorPoint`点在superLayer中的位置坐标,`position`点是相对suerLayer的,`anchorPoint`点是相对layer的
######简单的瞎说下:
`anchorPoint` 是 view的左上角 (view.frame.origin) 相对于`position`的位移 值(0~1)
理解这句话 你就懂了😂