Business needs to add a long press gesture to the cell
// need to add in this method -(UITableViewCell *) TableView: (UITableView *) TableView Cellforrowatindexpath: (Nsindexpath * // Add long press gesture uilongpressgesturerecognizer * longpressgesture =[[ Uilongpressgesturerecognizer alloc]initwithtarget:self Action: @selector (celllongpress:)]; Longpressgesture.minimumpressduration=1.5f; // set long by Time return cell ;}
-(void ) celllongpress: (Uilongpressgesturerecognizer *) longrecognizer{ if (Longrecognizer.state==uigesturerecognizerstatebegan) { // To be the first responder, you need to override the method [self becomefirstresponder]; Cgpoint location = [Longrecognizer LocationInView:self.tableView]; Nsindexpath * indexpath = [Self.tableview indexpathforrowatpoint:location]; // //
#pragma Mark implementation becomes the first responder method-(BOOL) canbecomefirstresponder{ return YES;}
iOS development-Add a long press gesture to the cell