UILabel not updating
- by iFloh
Sorry the basic question, but this bugs me for a while now.
I create a details view from a UITable and try to dynamically set its labels, but they are not updating:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
myObject *tmpObj = [[myObject objectAtIndex:indexPath.section] objectAtIndex:indexPath.row];
myViewController *tmpVC = [[myViewController alloc] initWithNibName:@"NIBfile" bundle:nil];
[tmpVC.myLabel setText:tmpObj.myTitle]; // The debugger shows the text: myTitle = "myText"
NSLog(@"%@", tmpVC.myLabel); // NSLog SHOWS NULL
[self.navigationController pushViewController:tmpVC animated:YES];
[tmpObj release];
}
any ideas why the value is not coming through?