我有一个基于约束的高度动画。但是,当动画开始时,它将视图的中心作为锚点而不是顶部。
我希望它动画为固定顶部并从底部收缩。
对不起,我的英语不是母语人士。
我的观点锚定:
top: superview
left: superview
right: superview
bottom: nil
// current height constant 200
view.height.constant = 0
UIView.animation(withDuration: 0.2, animations: {
view.layoutIfNeded()
}}