【发布时间】:2016-10-13 12:02:17
【问题描述】:
我正在为 UIPickerView 的高度约束设置动画。 视图跳到一个小的高度仍然显示 1 行,然后动画直到高度 0。
UIView.animate(withDuration: 0.5, animations: {
self.timePickerHeightConstraint.constant = self.pickerIsClosed ? 216 : 0
self.view.layoutIfNeeded()
}) { compilation in
self.pickerIsClosed = !self.pickerIsClosed
}
有什么建议吗? 谢谢
【问题讨论】:
标签: ios swift uipickerview uiviewanimation