ios怎样慢速滑动返回
展开全部
边缘滑动返回,在设置了自定义导航条或者自定义左button的时候会失效,通过这句话可以解决bug
:self.navigationController.interactivePopGestureRecognizer.delegate = self
这里不要忘记设置代理:UIGestureRecognizerDelegate
如何设置整个页面滑动返回?
1 获取边缘滑动返回对象
id target = self.navigationController.interactivePopGestureRecognizer.delegate;
2 调用全屏滑动手势
UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc]
initWithTarget:target action:@selector(handleNavigationTransition:)];
3 设置代理 添加手势
pan.delegate = self;
[self.view addGestureRecognizer:pan];
4 屏蔽系统自带滑动返回
self.navigationController.interactivePopGestureRecognizer.enabled = NO;
:self.navigationController.interactivePopGestureRecognizer.delegate = self
这里不要忘记设置代理:UIGestureRecognizerDelegate
如何设置整个页面滑动返回?
1 获取边缘滑动返回对象
id target = self.navigationController.interactivePopGestureRecognizer.delegate;
2 调用全屏滑动手势
UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc]
initWithTarget:target action:@selector(handleNavigationTransition:)];
3 设置代理 添加手势
pan.delegate = self;
[self.view addGestureRecognizer:pan];
4 屏蔽系统自带滑动返回
self.navigationController.interactivePopGestureRecognizer.enabled = NO;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询