美文网首页乔帮主的遗产
presentViewController 添加一个返回手势

presentViewController 添加一个返回手势

作者: 三十一_iOS | 来源:发表于2016-07-07 15:21 被阅读186次
    
        UIScreenEdgePanGestureRecognizer *edgeGes = [[UIScreenEdgePanGestureRecognizer alloc]  initWithTarget: self  action:@selector(edgePan:)];
        edgeGes.edges = UIRectEdgeLeft;
        [self.view addGestureRecognizer:edgeGes];
    
    
    
    -(void)edgePan:(UIPanGestureRecognizer *)recognizer{
        [self dismissViewControllerAnimated:YES completion:^{
            
        }];
    }
    

    相关文章

      网友评论

        本文标题:presentViewController 添加一个返回手势

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