I have a case but the detailtext is not showing? Does anyone know what te problem is?
i used: UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UIViewController *controller;
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
switch(indexPath.row) {
case 0:
{
NSLog(@"Case 0");
controller = [[wed1 alloc] init]; //WithStyle:UITableViewStylePlain];
[self.navigationController pushViewController:controller animated:YES];
cell.detailTextLabel.text = @"Wedstrijden!";
}
break;
//created a controller
//at his point, you are showing next ViewController’s view
//here you are changing the text of the text for current tableView’s cell (which is actually going to be off the screen as new controller’s view will be shown after previous statement execution)
with the piece of code you shared – I don’t find anything wrong here, the detail text should not be visible as this view will be gone.