监听tableview的点击事件

// 监听tablview的点击事件
- (void)addAGesutreRecognizerForYourView

{
    
    UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapGesturedDetected:)]; // 手势类型随你喜欢。
    
    tapGesture.delegate = self;
    
    [self.chooseView addGestureRecognizer:tapGesture];
    
}

- (void)tapGesturedDetected:(UITapGestureRecognizer *)recognizer

{
    [self.chooseView endEditing:YES];
    // do something
    
}

 

posted @ 2016-04-22 13:42  heyode  阅读(1183)  评论(0编辑  收藏  举报