Touch events on UITableView?

前端 未结 7 712
[愿得一人]
[愿得一人] 2020-12-23 10:26

I have UIViewControllerand UITableView as child in the view, what I want to do is when I touch any row I am displaying a view at bottom. I want to

7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-23 10:34

    To receive touch events on the UITableView use:

    - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
    {
      //
    
      [super touchesBegan:touches withEvent:event];
    }
    
    - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
    {
       //
    
       [super touchesMoved:touches withEvent:event];
    }
    
    - (void)touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event
    {
      //
    
      [super touchesEnded:touches withEvent:event];
    }
    
    - (void)touchesCancelled:(NSSet*)touches withEvent:(UIEvent*)event
    {
       //
       [super touchesCancelled:touches withEvent:event];
    }
    

提交回复
热议问题