1

detailTextLabel是否可以根据 in 中的 indexPath确定行didSelectRowAtIndexPath

我希望能够使用打开电话链接

[[UIApplication sharedApplication] openURL:xyz] 

如果单元格具有详细文本标签“电话”。

这可能吗?

谢谢

4

2 回答 2

1
[[myTableView cellForRowAtIndexPath:path].detailTextLabel.text isEqualToString:@"phone"];
于 2010-04-24T21:10:11.550 回答
0

假设您为表格视图提供数据源,您可以直接检查数据而不是表格视图单元格。

如果这是不可能的,你总是可以称自己为:

[[tableView dataSource] tableView:tableView cellForRowAtIndexPath:indexPath];并检查生成的单元格。

于 2010-04-24T21:12:14.073 回答