I've a CollectionViewController with the default status bar and all it's embedded in a NavigationController.
I'm trying to reproduce an effect in which I have a View anchored to the top of the screen, since my navController is fully transparent and my status bar is also transparent, but somehow when I anchor my view to the topAnchor
it stays clipped to the NavigationController bottomAnchor, because it 'thinks' the top of the screen is the navController's bottom.
I managed to bypass this simply after anchoring the view to the top, I gave it a negative topPadding and it now is where I desired it to be.
I know there's a way to extend the layout to the top screen but I can't figure it out.
Can you give me an hint?
I'm trying this:
I'm getting this:
The white space is the status bar height + NavigationController height
Thanks
Well, this pins my
UIImageView
to the Top of the screen... underneath the nav and status bars. Shouldn't be any different with a collection view:Edit: Sorry, was working in an Obj-C project... here it is in Swift:
and... here it is with a collection view also (kinda hard to tell with a plain screen-cap):