The frame of uitableview is not changing programmatically

ios, objective-c, uitableview, uiviewcontroller

Solution

When using autolayout, modifying the frame will have no effect.

Instead, you should modify the constraints.

You can do this by creating outlets for your constraints and connecting then in the interface builder.

Problem

I have 2 `UITableView` in my `UIViewController`. one of them is in the right side of the screen till center of screen. The other is from center till left bound. User can hide the right `UITableview` by pressing one a button on the navigation bar. I use this code to make left `UITableview` full screen: ``` self.rightTableView.hidden= YES; self.leftTable.frame= CGRectMake(0, self.dataTableView.frame.origin.y, self.view.frame.size.width, self.dataTableView.frame.size.height); ``` But it is not working. I even put this code on the `viewdidload` and `viewDidAppear` methods but the frame not changing.

Original source