1

Im trying to make an animation over a view in my ViewController.

My problem is that the scroll/swipe gestures over other elements like UITableViewControllers or UIPageViewControllers get disabled until the animation finishes.

How can I avoid this behaviour?

Addev
  • 31,819
  • 51
  • 183
  • 302
  • 2
    Take a look at this: https://stackoverflow.com/questions/5921173/uiview-animations-canceling-any-touch-input?noredirect=1&lq=1 – 0rt Oct 23 '17 at 12:48

1 Answers1

4

Do your animations using allowUserInteraction option:

UIView.animate(withDuration: duration, delay: 0, options: .allowUserInteraction,
       animations: {
           // Your animations here
       },
                completion: nil
)
Rafał Sroka
  • 39,540
  • 23
  • 113
  • 143