zoukankan      html  css  js  c++  java
  • 第14月第17天 automaticallyAdjustsScrollViewInsets contentInsetAdjustmentBehavior

    1.

    automaticallyAdjustsScrollViewInsets

    self.edgesForExtendedLayout = UIRectEdgeNone;

     

        if ([self respondsToSelector:@selector(automaticallyAdjustsScrollViewInsets)]){

            self.automaticallyAdjustsScrollViewInsets = NO;

        }

     

     

    //如果还是有20px偏移,只能在以下方法设置了
    - (void)scrollViewDidScroll:(UIScrollView *)scrollView
    {
        if (_viewModel.pageType == 2) {
            //等级
            _tableView.contentOffset = CGPointMake(0, 0);
            return;
        }
    
        if (_tableView.contentOffset.y < 0) {
            _tableView.contentOffset = CGPointMake(0, 0);
        }

     ios11

        self.automaticallyAdjustsScrollViewInsets = NO;
        if ([_tableView respondsToSelector:@selector(setContentInsetAdjustmentBehavior:)]) {
            if (@available(iOS 11.0, *)) {
                _tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
            } else {
                // Fallback on earlier versions
            }
        }

     http://www.jianshu.com/p/8440a3d181c9

    http://www.jianshu.com/p/75fd23bb5286

  • 相关阅读:
    插入排序(JS代码)
    选择排序(JS代码)
    快速排序(JS代码)
    冒泡排序(js代码)
    《CSS揭秘》--推荐指数⭐⭐⭐⭐⭐
    CSS中position的定位
    逆转录转座子初窥
    django开发傻瓜教程-1-安装和HelloWorld
    爬虫教程-1
    算法_NP_证明
  • 原文地址:https://www.cnblogs.com/javastart/p/7849787.html
Copyright © 2011-2022 走看看