If I'm animating a UIButton and use the .allowUserInteraction option, the area of the final frame at the end of the animation can be tapped to interact with the button, even before the button has made it to that frame. Tapping where the button is visible does not trigger the action if it is outside of the final frame the button is animating toward:
UIView.animate(withDuration: 9.0, delay: 0.0, options: [.curveLinear, .allowUserInteraction], animations: {
self.theButton.frame = CGRect(x: (self.view.frame.width * 0.1), y: self.theButton.frame.origin.y, width: self.theButton.frame.width, height: self.theButton.frame.height)
}, completion: nil)
Any help would be greatly appreciated. Thanks!