viewcontroller嵌套viewcontroller时,如果子vc内容显示位置偏下,在父VC中使用下面的处理方法:
if([self respondsToSelector:@selector(automaticallyAdjustsScrollViewInsets)])
self.automaticallyAdjustsScrollViewInsets = NO;
子vc中含有scrollview,暂不确定不含scrollview的会不会出现此情况。
本文介绍了解决UIViewController嵌套时子ViewController内容显示偏下的问题,通过禁用自动调整scrollView内边距来修正布局。
viewcontroller嵌套viewcontroller时,如果子vc内容显示位置偏下,在父VC中使用下面的处理方法:
if([self respondsToSelector:@selector(automaticallyAdjustsScrollViewInsets)])
self.automaticallyAdjustsScrollViewInsets = NO;
子vc中含有scrollview,暂不确定不含scrollview的会不会出现此情况。

被折叠的 条评论
为什么被折叠?