I'm pushing detailViewController (UIViewController) from UITableViewController. detailViewController consists of UITextView and small UITableView. I have set my detailViewController to be UIViewController that implements UITableViewDataSource and UITableViewDelegate protocols.I have delegate and datasource outlets in IB. I have those required table delegate and datasource methods that are called when detailViewController is pushed on top. I get called the methods that set number of sections (1) and number of rows in section (2). The problem is I do not see my tableView on screen when detailViewController is on top.
I have noticed that Xcode warns me about initWithStyle in detailViewController that it may not respond to [super initWithStyle:style]:
- (id)initWithStyle:(UITableViewStyle)style{
self = [super initWithStyle:style];
if (self) {
// Custom initialization
}
return self;
}
I understand that it does not belong to UIViewController but how to get things worked out?
UPDATE: It appears my tableView is shrink-ed. I have set enough height and width for it in IB but it looks like the tableView appears on screen with very narrow one row and it does not resize when the tables fills with rows. IMHO it somehow related to being unable to call initWithStyle. Does anybody achieved similar solution in other ways?