The title might be a little confusing, but is there a way I can Get this code to execute the moment I touch the uiview?
entry.transform = CGAffineTransform(scaleX: 0.975, y: 0.975)
speech.transform = CGAffineTransform(scaleX: 0.975, y: 0.975)
I have a UIView that I want to simulate a button press. Currently, the way I have it set up, It only triggers once my finger has left the screen
func voiceTap(sender: UITapGestureRecognizer? = nil) {
entry.transform = CGAffineTransform(scaleX: 0.975, y: 0.975)
speech.transform = CGAffineTransform(scaleX: 0.975, y: 0.975)
UIView.animate(withDuration: 0.2, delay: 0, options: UIViewAnimationOptions.curveLinear, animations: {
self.entry.transform = CGAffineTransform.identity
self.speech.transform = CGAffineTransform(scaleX: 0.975, y: 0.975)
}, completion: nil)
}
How to I get the code outside of the animation block to trigger the moment my finger touches the UIView?