View being blocked by UITransitionView after being presented

北城以北 提交于 2019-11-30 06:45:10

To get tap events through the UITransitionView, set the containerView's userInteractionEnabled to false. This is if you're doing a custom transition animation by using UIViewControllerAnimatedTransitioning.

Example, in your animateTransition(_:):

func animateTransition(transitionContext: UIViewControllerContextTransitioning) {

    let containerView = transitionContext.containerView()        
    containerView.userInteractionEnabled = false

    ...
}

I had the same issue but in a little different scenario, I ended up doing something very similar to find the view but instead of removing the view which can be more problematic I disabled the user interaction so any touch events just go throw it and any other objects can handle to user's interaction. In my case this was only present after updating the app to iOS 10, the same code running in iOS 9 didn't fall into this.

I was facing the same issue, and this solved issue for me,

navigationController.setNavigationBarHidden(true, animated: false)

This worked for me as I am having custom view as navigation bar in view controllers.

Ive had this issue when I was setting accessibilityElements on a popover view controller. I fix it by removing assigning an array of elements.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!