美文网首页
interactivePopGestureRecognizer

interactivePopGestureRecognizer

作者: caixin | 来源:发表于2016-11-22 17:53 被阅读0次

    在NavigationController堆栈内的UIViewController可以支持右滑手势,即在屏幕左边一滑,屏幕就会返回。但是在自定义返回按钮这个手势就会失效。解决方法找到两种:

    • 重新设置手势的delegate

    self.navigationController.interactivePopGestureRecognizer.delegate= (id)self;

    • 自己响应这个手势的事件

    [self.navigationController.interactivePopGestureRecognizeraddTarget:self action:@selector(handleGesture:)];

    相关文章

      网友评论

          本文标题:interactivePopGestureRecognizer

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