In my iOS application (developed using Xamarin) I am using a custom container view controller to switch between different child view controllers (which all contain a UITableView
) associated with the segments of a UISegmentedControl
.
At the beginning I was having an issue with the wrong contentInset
assigned when switching to a new view controller, as the view was positioned underneath the navigation bar. I solved the issue with the solution presented in this other stackoverflow question, and it worked like charm.
The problem now is that one of the child view controllers presents another view controller modally, and when it is dismissed, the contentInset
is set wrong again. In this case with the tableview starting at the middle of the available space, with quite some white space between the navigation bar and the first row.
I was trying to understand which method implicitly changes the content inset, but I no luck. So, what method could be the culprit of this behaviour?
I have tried with setting automaticallyAdjustsScrollViewInsets
both to true and false, but the result is the same.
UPDATE: It seems that the issue is presented only in iOS 8, but not in iOS 7