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

  • 相关阅读:
    [CF1166E] The LCMs Must be Large
    AtCoder Beginner Contest 161
    [CF1168B] Good Triple
    [CF1172B] Nauuo and Circle
    [CF1185E] Polycarp and Snakes
    [CF1187E] Tree Painting
    Codeforces Round #631 (Div. 2)
    [CF1200E] Compress Words
    Thinkphp绕过宝塔getshell
    如何成为一个漏洞赏金猎人
  • 原文地址:https://www.cnblogs.com/javastart/p/7849787.html
Copyright © 2011-2022 走看看