if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) {
self.edgesForExtendedLayout = UIRectEdgeNone;
self.extendedLayoutIncludesOpaqueBars = NO;
self.modalPresentationCapturesStatusBarAppearance = NO;
}
- (void)AutomaticalAdjustScrollViewDisable:(id)aVCorScrollView {
if ([aVCorScrollView isKindOfClass:[UIViewController class]]) {
UIViewController* aVC = aVCorScrollView;
aVC.automaticallyAdjustsScrollViewInsets = NO;
}
else if ([aVCorScrollView isKindOfClass:[UIScrollView class]]){
UIScrollView* aScrollView = aVCorScrollView;
if (@available(iOS 11.0, *)) {
aScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
}
}
UITableView的预处理高度
self.tableView.estimatedRowHeight = 0;
self.tableView.estimatedSectionHeaderHeight = 0;
self.tableView.estimatedSectionFooterHeight = 0;