我从这个例子定制刷卡识别类: How to detect a swipe-to-delete gesture in a customized UITableviewCell?进入编辑模式,单列/细胞
- (void)cellSwiped:(UIGestureRecognizer *)gestureRecognizer {
if (gestureRecognizer.state == UIGestureRecognizerStateEnded) {
UITableViewCell *cell = (UITableViewCell *)gestureRecognizer.view;
NSIndexPath* indexPath = [self.tableView indexPathForCell:cell];
}
}
现在我想选择单行在indexPath并启用编辑模式吧,有人能告诉我如何做到这一点吗?
我明白你想说什么,但我对iOS编程还很陌生,我不完全明白要做什么。我做了这样的事情,似乎没有工作。 if([notifTable cellForRowAtIndexPath:indexPath]){[notifTable cellForRowAtIndexPath:indexPath] setEditing:YES animated:YES]; 返回YES; – user2180859 2013-03-18 04:17:33