gpt4 book ai didi

iphone - iPhone UITableView 错误

转载 作者:行者123 更新时间:2023-12-03 20:08:45 24 4
gpt4 key购买 nike

我有一个带有行的UITableView

-[self.friendsPhotoArray count]+1

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [self.friendsPhotoArray count]+1;
NSLog(@"array val%@",[self.friendsPhotoArray count]);

}

现在我想检查哪一行是最后一行并将其设为不可编辑,即不执行didSelect 函数。有人可以帮忙吗?

谢谢。

最佳答案

- (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if(indexPath.row==[array count]-1)
{
//Do Nothing
}
else
{
//Do Whatever You Want
}
}

关于iphone - iPhone UITableView 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6043092/

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