IOS_XIB drawing UIScrollerView appears to be offset by a status bar height

Problems occur:
1. There is no navigation bar, and the full screen is a scroll view.
2. When drawing a UIScrollerView with xib and removing the safe area, the page always appears to be offset by the height of the status bar.
Problem solving method:
1. Code

if (@available(iOS 11.0,*)) {
    self.backScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}else{
    self.automaticallyAdjustsScrollViewInsets = NO;
}

2. Modify the configuration of the xib file, modify the value here, and modify it toNever
Insert picture description here

Guess you like

Origin blog.csdn.net/FlyingKuiKui/article/details/104776413