美文网首页
导航栏全屏滑动返回

导航栏全屏滑动返回

作者: SwordAndTea | 来源:发表于2017-09-05 08:38 被阅读0次

1.首先创建一个UINavigationController的子类,然后在子类的.m文件中viewDidLoad函数中实添加

UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self.interactivePopGestureRecognizer.delegate action:@selector(handleNavigationTransition:)];
pan.delegate = self;
[self.view addGestureRecognizer:pan];

然后使用子类导航栏就可以实现全屏滑动返回效果了

相关文章

网友评论

      本文标题:导航栏全屏滑动返回

      本文链接:https://www.haomeiwen.com/subject/waasjxtx.html