justColbs
justColbs

Reputation: 1872

Removing White Space before a UITableView in a UIContainerView- Xcode 6.4, Swift

I just recently had the issue of removing the annoying white space before a UITableView in a view controller.

Specifically, I had a UITableViewController embedded in a UIContainerView. I tried unchecking Adjusts Scroll View Insets in Attributes inspector for the UITableViewController, and nothing seemed to be working. I even tried setting self.automaticallyAdjustsScrollViewInsets = false and got nothing!

I finally figured it out. I hope this solution below helps you!

Upvotes: 1

Views: 281

Answers (1)

justColbs
justColbs

Reputation: 1872

When using a UIContainer view and embedding your UITableViewController in it, you must uncheck Adjusts Scroll View Insets in the View Controller CONTAINING the UIContainerView, not in the View Controller embedded in the UIContainerView.

Unchecking this option anywhere else in this situation does not resolve the white space issue.

Let me know if this helps some of you!

Upvotes: 2

Related Questions