uiscrollview autolayout offset navigation异常

uiscrollview autolayout offset navigation错误

使用autolayout设置uiscrollview会出现contentView和scrollview有offset的问题,但是没有navigation的时候又没有,出现这个现象的原因是UIScrollView(会自动在顶部和底部预留一些空白 使用

self.automaticallyAdjustsScrollViewInsets = NO;

就能解决这个问题