你能用视觉格式语言为指标制作动画吗?我尝试过类似以下的方法:
// ViewDidLoad
self.padding = 100
self.metrics = [:]
self.metrics?["padding"] = 100
// And then in some method
UIView.animate(withDuration: 0.5, animations: {
self.metrics?["padding"] = 100
self.view.layoutIfNeeded()
})