Reputation: 9419
I have a view controller with a table view and a tab bar controller. I perform a segue when one of the cells is tapped in the didSelectRow
method. I then pass the data in prepareForSegue
. The segue is set up in the storyboard from the view controller to the tab bar and its kind is "Show".
When the tab bar controller is displayed (well, one of its view controllers), the content is at the very top of the view. The problem is fixed after I switch tab bars and then go back to the original tab bar. Any way to fix this?
Upvotes: 1
Views: 1661
Reputation: 13459
Are you using interface builder?
Open storyboard where you defined this view controller.
Then in Attributes Inspector DESELECT the Extend Edges Under Top Bars
property.
Alternatively you can make your view snap to the Top Layout Guide instead of the root view itself.
Upvotes: 6