1
我有一个UIView,我正在初始化,以100%的视角右侧开始“离屏”。我通过以下方式执行此操作:动画自动布局`leftAnchor`约束变化
[childView.leftAnchor constraintEqualToAnchor: superview.rightAnchor
constant: 1.0].active = YES;
然后,我想从左侧“滑动”视图。我想也许这样做:
[UIView animateWithDuration: 5
animations: ^{
[childView.leftAnchor constraintEqualToAnchor: superview.leftAnchor
constant: 1.0].active = YES;
}];
可能会这样做,但它会立即发生(没有动画,它只是'出现')。
是否可以使用自动布局锚提供动画?