首页 > 移动平台 > 详细

iOS开发-iOS7禁用手势返回

时间:2015-08-20 12:10:05      阅读:243      评论:0      收藏:0      [点我收藏+]
- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];

    // 禁用 iOS7 返回手势
    if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
        self.navigationController.interactivePopGestureRecognizer.enabled = NO;
    }
}

- (void)viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];

    // 开启
    if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
        self.navigationController.interactivePopGestureRecognizer.enabled = YES;
    }
}

  

iOS开发-iOS7禁用手势返回

原文:http://www.cnblogs.com/feiling/p/4744312.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!