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

情况是这种:

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

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

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



上图:



// 解决方法

        self.automaticallyAdjustsScrollViewInsets = NO


posted @ 2017-04-30 16:16  clnchanpin  阅读(371)  评论(0)    收藏  举报