Wie ändern Sie die textLabel, wenn UITableViewCell ausgewählt ist?

Will ich ändern das textLabel und detailTextLabel einer Zelle, wenn es ausgewählt wurde.
Ich habe versucht, die folgenden, aber keine änderung:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    MyAppDelegate *appDelegate = (MyPhoneAppDelegate*)[[UIApplication sharedApplication] delegate];

    UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
    cell.detailTextLabel.text = @"xxxxx";
    cell.textLabel.text =       @"zzzzz";
    [tableView reloadData];
}
InformationsquelleAutor Ike | 2009-12-03
Schreibe einen Kommentar