How can I detect a double tap on a certain cell in UITableView?

后端 未结 14 1028
悲哀的现实
悲哀的现实 2020-12-01 00:18

How can I detect a double tap on a certain cell in UITableView?

i.e. I want to perform one action if the user made a single touch and a

14条回答
  •  温柔的废话
    2020-12-01 00:58

    Override in your UITableView class this method

    - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
     {
    
         if(((UITouch *)[touches anyObject]).tapCount == 2)
        {
        NSLog(@"DOUBLE TOUCH");
        }
        [super touchesEnded:touches withEvent:event];
    }
    

提交回复
热议问题