1
在我的tableView didSelectRowAtIndexPath中,我可以訪問單元格textLabel。如何訪問部分標籤?如何從didSelectRowAtIndexPath訪問UITableView部分標籤
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
topPlacesAppDelegate *appDelegate = (topPlacesAppDelegate *) [[UIApplication sharedApplication] delegate];
appDelegate.chosenPhoto = [self.topPlaces objectAtIndex:indexPath.row];
. . .
UITableViewCell *mycell = [tableView cellForRowAtIndexPath:indexPath];
NSLog(@" indexPath.section/Row = %i/%i", indexPath.section, indexPath.row);
NSLog(@" textLabel.text = %@", mycell.textLabel.text);
NSLog(@" detailTextLabel.text = %@", mycell.detailTextLabel.text);
[self performSegueWithIdentifier:@"Show Site Table" sender:nil];
}