关于tableView在滚动时存在的偏移量问题

if (@available(iOS 11.0, *)) {
        // 版本适配
        <!--self.edgesForExtendedLayout = UIRectEdgeNone;-->
        <!--self.extendedLayoutIncludesOpaqueBars = NO;-->
        <!--self.modalPresentationCapturesStatusBarAppearance = NO;-->
        <!--self.automaticallyAdjustsScrollViewInsets = NO;-->
        self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
    }
    else{
        self.automaticallyAdjustsScrollViewInsets = NO;
    }


  if (@available(iOS 11.0, *)) {
    // 版本适配
  }
  // 或者
  #ifdef __IPHONE_11_0   
  #endif
 
原文地址:https://www.cnblogs.com/wj0920wjx/p/11017148.html