views:

110

answers:

2

Is it possible to determine a row's detailTextLabel based on an indexPath in didSelectRowAtIndexPath?

I want to be able to open a phone link using

[[UIApplication sharedApplication] openURL:xyz] 

if the cell has the detail text label "phone".

Is this possible?

Thanks

+1  A: 
[[myTableView cellForRowAtIndexPath:path].detailTextLabel.text isEqualToString:@"phone"];
drawnonward
A: 

Assuming that you provide the data source for the table view, you could check your data directly instead of the table view cell.

If this is somehow not possible, you could always call yourself:

[[tableView dataSource] tableView:tableView cellForRowAtIndexPath:indexPath]; and inspect the resulting cell.

frenetisch applaudierend