我决定在没有填写某些细节时尝试设置按钮动画。但是,当按钮动画时,它变得不可操作。有人可以解释为什么会这样吗?
这是我的代码:
override func viewDidLoad() {
super.viewDidLoad()
EnterDet.alpha = 1
animateText()
}
func animateText(){
UIView.animate(withDuration: 1.0, animations: {
self.EnterDet.alpha = 1
}, completion: {
(Comnpleted : Bool) -> Void in
UIView.animate(withDuration: 1.0, delay: 3.0, options: UIViewAnimationOptions.curveLinear, animations: {
self.EnterDet.alpha = 0.1
}, completion: {
(Completed : Bool) -> Void in
self.animateText()
})
})
}