【发布时间】:2018-07-20 05:32:33
【问题描述】:
当我的应用统计时,我想显示按钮动画。在情节提要中,我的按钮有height = 50 和y = -50。我在代码中有这个动作。
@IBOutlet weak var imageView: UIImageView!
override func viewDidLoad()
{
super.viewDidLoad()
buttonAnimation()
}
func buttonAnimation()
{
self.buttonTopConstraint.constant += self.ButtonHeightConstraint.constant
UIView.animate(withDuration: 1.5, delay: 0.0, options: [], animations:
{
self.view.layoutIfNeeded()
}
)
}
动画效果很好。但是当应用程序在storyboard 中启动我的背景imageView 并且不同的imageView 也动画了。但我只需要按钮动画。如何解决?
【问题讨论】: