Reputation: 1403
I've implemented a long press gesture recognizer on a table view cell that shows the UIMenuController and when menu shows, the corresponding table view cell is getting selected which is my requirement.But the problem is when I touches out side,UIMenuController is getting dismissed but the cell is still in selected state.How to deselect the cell when pressing outside
Upvotes: 0
Views: 181
Reputation: 15335
I hope that, you are using the UIPopOverController
to show the Menu .
Use the Delegate
of popoverControllerDidDismissPopover event to get your solution
- (void) popoverControllerDidDismissPopover:(UIPopoverController *) popoverController {
[myTable deselectRowAtIndexPath:[myTable indexPathForSelectedRow] animated:YES];
}
Upvotes: 2