gpt4 book ai didi

iphone - ios didselectrowatindexpath 在编辑模式下不调用

转载 作者:可可西里 更新时间:2023-11-01 04:08:54 25 4
gpt4 key购买 nike

<分区>

您好,在表格 View 编辑模式下,didselectrowatindexpath 函数没有被调用。这是我的代码。我的代码有什么问题吗?

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath  {
if (self.tableView.editing == YES) {
NSLog(@"now in editing mode");
}
else {
NSLog(@"now in normal mode");
}
}

- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
[super setEditing:editing animated:animated];
// must be called first according to Apple docs
[self.tableView setEditing:editing animated:animated];
}

- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
// Return NO if you do not want the specified item to be editable.
return YES;
}

- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
return UITableViewCellEditingStyleNone;
}

- (BOOL)tableView:(UITableView *)tableView shouldIndentWhileEditingRowAtIndexPath:(NSIndexPath *)indexPath {
return NO;
}

请帮忙谢谢

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com