ios - Set margins/constraints for UIViewController -


Is there a way to set margins or constraints for UIViewControllers?

I have this structure

UIWindow - UINavigationController - UICollectionView

I would like to layout so that the UINavigationController is positioned below the status bar Do not use, and do not use UICollectionView space in UINavigationController under my custom toolbar.

Is there any way to check the obstacles to see the controllers? Or any other way to achieve this behavior?

My UICollectionView has a different background color and is currently also set under the status bar.

Post (and table view and other UIScrollView subclasses) you want to display under your navigation bar and status bar (if Bar is translucent) as content scroll will be seen through it.

Do not you want that these bars are stuck under the material, so it can not be seen. By setting the contentInset property of the scroll view, you do so, so that the content does not need to be visible to the top of the scroll view.

Here's how you have the Content Instant property so that the content does not interfere with the status bar and the navigation bar and a tab bar below:

  self CollectionView.contentInset = UIEdgeInsetsMake (64.0F, 0.0F, 49.0F, 0.0F);  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -