gpt4 book ai didi

iphone - 访问 UITableView 中单元格的文本

转载 作者:行者123 更新时间:2023-11-28 20:32:58 32 4
gpt4 key购买 nike

有没有办法访问表格中的给定单元格?

例如,如果我只想访问表中第四个单元格的详细文本,我该怎么做?这主要是使用标签完成的吗?谢谢!

最佳答案

UITableViewCell *cell = [tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:3 inSection:0]];
NSString *detail = cell.detailTextLabel.text

indexPathForRow 更改为适当的行号。

关于iphone - 访问 UITableView 中单元格的文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11588981/

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