下面是Apple官方提供的文档解释,看过之后还是觉得太过于抽象,于是用代码来实验吧。
**edgesForExtendedLayout **
The extended edges to use for the layout.
**automaticallyAdjustsScrollViewInsets **
A Boolean value that indicates whether the view controller should automatically adjust its scroll view insets.
**extendedLayoutIncludesOpaqueBars **
A Boolean value indicating whether or not the extended layout includes opaque bars. edgesForExtendedLayout
新建单个页面的项目,然后加上UINavigationController
- (CGSize)sizeThatFits:(CGSize)size; // return'best' size to fit given size. does not actually resize view. Default is return existing view size
- (void)sizeToFit; // calls sizeThatFits: with current view bounds and changes bounds size.