<分区>
我有一个 nslayoutconstraint,当用户按下一个按钮时,约束应该慢慢地达到零。目前它只是在按下按钮时自动快速归零。我的代码不工作。这里是。
@IBAction func Expansion(_ sender: AnyObject) {
UIView.animate(withDuration: 0.1, animations: {
self.ScrolliewTopConstraint.constant = 0
self.ScrollView.isScrollEnabled = true
}, completion: nil)
}