Ios 如何避免动画禁用触摸交互(滚动、滑动等)
我正在尝试在我的ViewController中的视图上制作动画 我的问题是,在动画完成之前,其他元素(如UITableViewController或UIPageViewController)上的滚动/滑动手势将被禁用Ios 如何避免动画禁用触摸交互(滚动、滑动等),ios,objective-c,swift,Ios,Objective C,Swift,我正在尝试在我的ViewController中的视图上制作动画 我的问题是,在动画完成之前,其他元素(如UITableViewController或UIPageViewController)上的滚动/滑动手势将被禁用 我怎样才能避免这种行为 使用allowUserInteraction选项制作动画: UIView.animate(withDuration: duration, delay: 0, options: .allowUserInteraction, animations:
我怎样才能避免这种行为 使用
allowUserInteraction
选项制作动画:
UIView.animate(withDuration: duration, delay: 0, options: .allowUserInteraction,
animations: {
// Your animations here
},
completion: nil
)
看看这个: