Reputation: 2743
I have a UITableviewController created with storyboard. Now i want to change the X and Y coordinates of the table view (specifically i want to put a little bit down the table view). There's an option in storyboard where i can set this parameter or change the tableview size? I can't find it
I've tried looking in the size inspector but it looks like X and Y parameter are disabled.
Upvotes: 2
Views: 8988
Reputation: 3864
Create a UIViewController with a Container View. Link the UITableViewController to the container. Now you can resize the table view by resizing the container.
Upvotes: 0
Reputation: 487
The tableview of UITableViewController is main view so we cannot adjust it in storyboard . If u want adjust size try this. In your UITableViewController .
- (void)viewDidAppear:(BOOL)animated
{
[self.tableView setFrame:CGRectMake(x, y, width, height)];
}
It is viewDidAppear
not viewWillAppear
Upvotes: 9
Reputation: 11394
I recommend you to drag a UIView to the UITableView. This will create a panel where you can add components and will make the UITableView go down. however, the UIView will also scroll down along with the table cells.
Another option is to create a UIViewController. Drag into it a UITableView. In this way, the tableview is fully resizable.
Upvotes: 3