我正在尝试将按钮的颜色(只是闪烁/闪烁)在扫描正确时更改为绿色,在出现问题时更改为红色。我可以用这样的View来做到这一点funcflashBG(){UIView.animateWithDuration(0.7,animations:{self.view.backgroundColor=UIColor.greenColor()})}但是有一个按钮它会保持绿色funcflashBtn(){UIButton.animateWithDuration(0.5,animations:{self.buttonScan.backgroundColor=UIColor.greenColor()})}我
我正在尝试将按钮的颜色(只是闪烁/闪烁)在扫描正确时更改为绿色,在出现问题时更改为红色。我可以用这样的View来做到这一点funcflashBG(){UIView.animateWithDuration(0.7,animations:{self.view.backgroundColor=UIColor.greenColor()})}但是有一个按钮它会保持绿色funcflashBtn(){UIButton.animateWithDuration(0.5,animations:{self.buttonScan.backgroundColor=UIColor.greenColor()})}我