I got a TabBar which contains CollectionViews in it. Recently I've encountered the problem that the first CollectionViews ContentInset is 0 on the top, but only at first. Which means it is under the TopBar when it shouldn't and when I navigate through the TabBar, it fixes.
I followed this question, but the solutions simply don't do anything. They also suggest to turn my translucid TopBar opaque, and I really want to avoid doing that.
Here's an image to explain a little bit more...
This is how the content is loading:
The items from my collection view appear under my top bar, which means ContentInset sets to 0 instead of correctly automatically adjusting. Then when I navigate trough the tabBar, it fixes on both tabs, as I said earlier.
I tried disabling the AutomaticallyAdjustsScrollViewInsets from the CollectionView, and doing it manually considering the size of the navbar and the status bar.
this.AutomaticallyAdjustsScrollViewInsets = false;
this.CollectionView.ContentInset = new UIEdgeInsets(UIApplication.SharedApplication.StatusBarFrame.Height + this.NavigationController.NavigationBar.Frame.Height, 0, 0, 0);
And this seemed to work at first, but then when I navigate through the TabBar, the ContentInset modifies and it moves down as if the AutomaticallyAdjustsScrollViewInsets set to false didn't work.
Any ideas on how to solve this problem without turnning the navbar opaque?