How get UITableView IndexPath from UITableView iphone?

后端 未结 4 984
粉色の甜心
粉色の甜心 2021-01-22 22:20

In my iPhone app I have one messaging screen. I have added UITapGestureRecognizer on the UIViewController and also I have a UITableview on

4条回答
  •  情深已故
    2021-01-22 23:12

    You can use the TagGesture delegate:

    - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
    {
        if ([touch.view isDescendantOfView:yourTableView]) {
            return NO;
        }
    
        return YES;
    }
    

    Hope this helps.

提交回复
热议问题