Reputation: 117
I am new to iOS development and I couldn't find an answer online for this. So I have a UIView and I have a UITableView within that view. But for some odd reason the table view doesn't extend the full width of the parent UIView.
The red color is the UIView.
The green color is the UITableView.
Here are the constraints for the TableView
Here are the constraints for the UIView
How can I get the table view to have the full width of the device/the UIView such that the only red visible is in the bottom and not on the sides as its currently shown in the picture? (The horrible colors are just for visual explanation. Not going to keep them lol)
Upvotes: 0
Views: 1924
Reputation: 6110
In your Storyboard:
Upvotes: 2
Reputation:
Remove constrain to margins as already suggested. Next select the left, top, right, and bottom bar, and make sure that the left, top and right margin settings are set to 0 and select a value for the bottom margin. This will force the view to the edges of the superview.[1]: https://i.sstatic.net/dNBfm.png
Upvotes: 0