【发布时间】:2011-07-11 22:55:55
【问题描述】:
当用户在我的 UITableView 中点击“添加新行”绿色加号按钮时,我使用什么方法知道?
【问题讨论】:
-
你有没有在按下按钮时被调用的函数?
标签: iphone ios ipad uitableview
当用户在我的 UITableView 中点击“添加新行”绿色加号按钮时,我使用什么方法知道?
【问题讨论】:
标签: iphone ios ipad uitableview
请参阅Table View Programming Guide 的“插入和删除行和节”部分
【讨论】:
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleInsert) {
//your code here
NSLog(@"user tapped insertion control");
}
}
【讨论】: