UITableViewController initialization method is not called

I created an iPad application with a UITableViewController in a UISplitViewController (and everything works :) Since I would like the table to use UITableViewStyleGrouped, I added:

- (id)init { self = [super initWithStyle:UITableViewStyleGrouped]; if (self != nil) { // Initialisation code } return self; } 

into the root view controller and included it in .h, but it is never called. So, two questions, can I configure UITableViewStyleGrouped for a table in a UISplitViewController? And if so, how?

+6
objective-c uitableview ipad
source share
2 answers

init will not be called, initWithStyle: or initWithFrame: style: can be called.

edit: waychick was right. - (id) initWithCoder:(NSCoder *) coder .

+8
source share

Same problem. In my case

 - (id) initWithCoder:(NSCoder *) coder 

called

+8
source share

All Articles