标签:
最近我在开发中遇到了一个问题,在使用NavigationController时内部的ViewController的View总是与屏幕顶部对齐,而我们有时候不需要这种效果:
在开发过程中,我们可能会需要这种布局:
需要加这句话,意思是让View的所有边都紧贴在容器内部。
即可
Ref:
https://developer.apple.com/library/ios/documentation/WindowsViews/Conceptual/ViewControllerCatalog/Chapters/NavigationControllers.html
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/index.html#//apple_ref/occ/instp/UIViewController/wantsFullScreenLayout
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/index.html#//apple_ref/occ/instp/UIViewController/edgesForExtendedLayout
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/index.html#//apple_ref/occ/instp/UIViewController/extendedLayoutIncludesOpaqueBars
iOS开发-设置在使用NavigateController时View的顶部位置
原文地址:http://www.cnblogs.com/zeyang/p/4496322.html