当前位置: 动力学知识库 > 问答 > 编程问答 >

swift - interactivePopGestureRecognizer is not working if I create custom backButton in a UIViewController

问题描述:

I created a custom backBarButton in my ViewController. But when I use the swipe right gesture, then it is not popping that view controller.

I tried enabling

self.navigationController?.interactivePopGestureRecognizer?.enabled = true

But its not working.

Anybody knows how to achieve similar effect as iOS default interactivePopGestureRecognizer even if using custom backBarButtonItem?(in swift)

分享给朋友:
您可能感兴趣的文章:
随机阅读: