[iOS]在NavigationController中的ScrollView中的子视图都会下移64个像素

情况是这种:

我有一个UINavigationController,设置为self.window的root视图, 然后有一个UIVIewController是UINavigtionController的根视图.

然后在UIViewController中增加一个ScrollView 在ScrollView中增加一个view.

此时发现. scrollView并没有自己主动下移64像素,而 ScrollView中的子视图VIew自己主动下移了64个像素.



上图:



// 解决方法

        self.automaticallyAdjustsScrollViewInsets = NO


原文地址:https://www.cnblogs.com/clnchanpin/p/6789697.html