iOS11

_tab.estimatedRowHeight = 0;

    if (@available(iOS 11.0, *)) {

        //当有heightForHeader delegate时设置

        _tab.estimatedSectionHeaderHeight = 0;

        //当有heightForFooter delegate时设置

        _tab.estimatedSectionFooterHeight = 0;

    }

/解决因为隐藏导航栏导致页面下沉的问题
if (@available(iOS 11.0, *)) {
_contentTV.contentInsetAdjustmentBehavior=UIScrollViewContentInsetAdjustmentNever;
} else {
}

原文地址:https://www.cnblogs.com/niit-soft-518/p/7895046.html