I am using table view in a view controller which is UITableViewController. I am trying to set the height of table by
[self.tableView setFrame:CGRectMake(0, 0, 320, 300)];
[self.tableView setBackgroundView:backImageView];
[self.tableView setSeparatorColor:[UIColor blackColor]];
but it is not working.
It doesn’t have XIB
Is there any way to do that?
For what I know you can’t do that (IF you push/showModal the tableviewcontroller), the view (in this case a tableview) of viewcontrollers is resized automatically to the screen size (- status bar, navigationbar and tabbar). You can however set
contentOffsetandcontentInset.In your case this should work (might need to change the values):