Reputation: 307
I am working on a iOS (Swift) project. I am trying to embed a UINavigationController inside a container view. As seen:
It goes: UITabBarController -> UIViewController: container view -> UINavigationController -> UIViewController
I have hidden the Navigation Bar and Toolbar for the UINavigationController
Everytime I run it, I am getting this result (the red is the container views background)
Why is this happening? and how can I get rid of the red bar and make the tableview fill the whole container view?
BTW: If I embed the table view to the container view directly, I don't have this problem. It only seems to happen when using a navigation controller.
Upvotes: 1
Views: 642
Reputation: 660
Try this answer https://stackoverflow.com/a/27149012/1570786 The above method works fine in iOS8, in iOS7 it doesn't work as expected.
Upvotes: 1
Reputation: 7419
This looks similar to an issue I've had before concerning the setAutomaticallyAdjustsScrollViewInsets
property on UIViewController
. Try playing with that on your FilterViewController
.
Another thing you could try is setting constraints around your table view inside your FilterViewController
to make sure it is attached to the edges of the view. (This can be ignored if FilterViewController
is a subclass of UITableViewController
).
Upvotes: 0