How to enable back/left swipe gesture in UINavigationController after setting leftBarButtonItem?

前端 未结 14 1025
遥遥无期
遥遥无期 2020-11-28 22:48

I got the opposite issue from here. By default in iOS7, back swipe gesture of UINavigationController\'s stack could pop the presented ViewCon

14条回答
  •  感动是毒
    2020-11-28 23:29

    Most answers are pertaining to doing it on code. But I'll give you one that works on Storyboard. Yes! You read it right.

    • Click on main UINavigationController and navigate to it's Identity Inspector tab.

    • Under User Defined Runtime Attributes, set a single runtime property called interactivePopGestureRecognizer.enabled to true. Or graphically, you'd have to enable the checkbox as shown in the image below.

    That's it. You're good to go. Your back gesture will work as if it was there all along.

    Image displaying the property that out to be set

提交回复
热议问题