I am trying to resize a table view of a UITableViewController so that I can also add other content to the view. Therefore, I am trying to change the table in a new view. The following works, but if I try to reference self.tableview later, it returns null. What am I doing wrong?
- (void) viewDidLoad {
[super viewDidLoad];
UIView * view = [[UIView alloc] initWithFrame: [UIScreen mainScreen] .applicationFrame];
self.tableView.frame = CGRectMake (0, 0, 320, 200);
[view addSubview: self.tableView];
self.view = view;
}
Yes, I can probably just use the UIViewController and create my own table view there. I was just trying to avoid this if I can, and get the free version of UITableViewController
source
share