In my application, I click on the view controller (UITableViewController), which also has a property / output that references the UITableViewCell. It seems like creating a controller using:
PreferencesController *pController = [[PreferencesController alloc] init];
does not create an object for UITableViewCell in the xib file, so the output is null, so loading the table throws an exception. I solved this with:
PreferencesController *pController = [[PreferencesController alloc] initWithNibName:@"PreferencesController" bundle:nil];
but I really didn’t understand why this worked, as from the documentation it seems that init should be enough to load the linked nib file (PreferencesController.xib).
ios uitableview uiviewcontroller init
Fr4ncis
source share