【发布时间】:2009-10-01 04:42:45
【问题描述】:
如果我在表格视图中按下特定单元格(编辑按钮的操作将在不按下编辑按钮的情况下执行)。请你回答好吗? 以下代码给出错误...
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSArray *deleteIndexPaths =[NSArray arrayWithObjects:
[NSIndexPath indexPathForRow:indexPath.row inSection:0],nil];
UITableView *tv = (UITableView *)self.view;
[tv beginUpdates];
[tv deleteRowsAtIndexPaths:deleteIndexPathswithRowAnimation:UITableViewRowAnimationFade];
[tv endUpdates];
}
【问题讨论】:
-
不能很好地理解你的问题。使用更好的标点和语法。看看developer.apple.com/iphone/library/documentation/UserExperience/…
-
什么样的错误?编译时错误,因为
tv未定义?或者您可以复制并粘贴到您的问题中的一些运行时错误?或者只是您可能描述的视觉故障?
标签: iphone