解决scrollerView上窜
2016-07-11 本文已影响69人
幻想另类美
添加scrollerView时,开始视图向下偏移(如图)

手动滑动时仍然保持偏移状态,当通过定时器走一波后,试图恢复正常状态(如图)

解决方案:
- (void)viewWillAppear:(BOOL)animated{
self.automaticallyAdjustsScrollViewInsets = NO;
}
一句代码终结烧脑ing......
添加scrollerView时,开始视图向下偏移(如图)
手动滑动时仍然保持偏移状态,当通过定时器走一波后,试图恢复正常状态(如图)
self.automaticallyAdjustsScrollViewInsets = NO;
}
一句代码终结烧脑ing......