码迷,mamicode.com
首页 > 其他好文 > 详细

TableView添加拖动手势冲突 不能上下滚动

时间:2015-11-27 20:00:59      阅读:224      评论:0      收藏:0      [点我收藏+]

标签:

#pragma mark - 添加拖动手势
- (void)addPanGestureRecognizer
{
    UIPanGestureRecognizer *panGesture = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handlePanFrom:)];
    panGesture.delegate=self;
    [self.tableView addGestureRecognizer:panGesture];
}

 

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
    
    if ([otherGestureRecognizer.view isKindOfClass:[UITableView class]]) {
        
        return YES;
        
    }
    
    return NO;
    
}

 

TableView添加拖动手势冲突 不能上下滚动

标签:

原文地址:http://www.cnblogs.com/huangzs/p/5001511.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!