是否可以根據didSelectRowAtIndexPath
中的索引路徑確定一行的detailTextLabel
?在didSelectRowAtIndexPath iPhone SDK中打開電話鏈接
我希望能夠使用
[[UIApplication sharedApplication] openURL:xyz]
如果小區有詳細的文字標籤「手機」,打開電話鏈接。
這可能嗎?
感謝
是否可以根據didSelectRowAtIndexPath
中的索引路徑確定一行的detailTextLabel
?在didSelectRowAtIndexPath iPhone SDK中打開電話鏈接
我希望能夠使用
[[UIApplication sharedApplication] openURL:xyz]
如果小區有詳細的文字標籤「手機」,打開電話鏈接。
這可能嗎?
感謝
[[myTableView cellForRowAtIndexPath:path].detailTextLabel.text isEqualToString:@"phone"];
假設你提供的表視圖中的數據源,你可以檢查你的數據,而不是直接的表視圖單元格。
如果這是某種不可能的,你可以隨時調用自己:
[[tableView dataSource] tableView:tableView cellForRowAtIndexPath:indexPath];
和檢查所得的細胞。