It is very easy to allow users to interact with views while animating using the options field of block based animation. But in my program I am using a CAKeyframeAnimation and I
Apparently, preview solution no longer works in Swift 3.x and Swift 4.x
I solved the issue setting a Timer to update the frame during the animation.
//Timer: To update the UI frame
Timer.scheduledTimer(timeInterval: 0.15, target: self, selector: #selector(updateFrame), userInfo: nil, repeats: true)
//Timer Selector
@objc func updateFrame(){
//getting the layer presentation bounds
let layer = "button, label...".layer.presentation()!
let point = CGPoint(x: layer.frame.origin.x, y: layer.frame.origin.y)
let size = CGSize(width: layer.frame.width, height: layer.frame.height)
// Update the UI element frame location
"ui element".frame = CGRect(origin: point, size: size)
}