UIScrollView touch events during animation not firing with animateWithDuration: but work fine with UIView beginAnimations:
You just need to include the UIViewAnimationOptionAllowUserInteraction option when invoking the animation like so:
[UIView animateWithDuration:animationDuration
delay:0
options:(UIViewAnimationOptionCurveLinear | UIViewAnimationOptionAllowUserInteraction)
<snip>];
That's a sneaky one, I know! ;)
Re: The "Discouraged" tag - In general, when Apple tells you not to do something in regards to designing applications that run on their platforms, it's usually for your own good. So you are right in wanting to adopt animation blocks instead of the clunky old way.
quickthyme
's answer is correct. Here is the snippet in Swift
Swift 4
UIView.animate(
withDuration: 0.3, // specify animation duration here
delay: 0, // specify delay if needed
options: [
UIView.AnimationOptions.allowUserInteraction,
UIView.AnimationOptions.curveLinear
],
animations: {
// animations code
}
)