I’ve got a grouped UITableView in a UITableViewController and I want to resize it horizontally.
I tried many different ways but none of them was perfect.
What I’ve tried:
1.) Overriding - [UITableView setFrame:], but it didn’t move the headers of the sections and there are black areas on both sides (because there isn’t anything behind the table view).
2.) Overriding - [UITableViewCell setFrame:], but it still doesn’t move the headers (which is important).
3.) Calling - [self.view setFrame:] from UITableViewController, but it doesn’t do anything.
If you’ve got any idea how to solve it please share it with me!
If you call
- [UITableView setFrame:]from- [UITableViewController viewDidAppear:], it works:In order to avoid having black bars on each side of the table view, set the background color of the application’s main window to white: