zoukankan      html  css  js  c++  java
  • iOS translucent automaticallyAdjustsScrollViewInsets edgesForExtendedLayout contentInsetAdjustmentBehavior

    translucent

           self.navigationController.navigationBar.translucent = NO;

           ios7 之后iOS7之后由于navigationBar.translucent默认是YES,原点在(0,0)点

           当设置NO的时候,原点坐标在(0,64)点开始,屏幕会多一个导航栏的高度

    automaticallyAdjustsScrollViewInsets

           self.automaticallyAdjustsScrollViewInsets = NO;

           self.edgesForExtendedLayout = UIRectEdgeNone;

    contentInsetAdjustmentBehavior

    iOS11中automaticallyAdjustsScrollViewInsets方法被废弃,我们需要使用UIScrollView的 contentInsetAdjustmentBehavior 属性来替代它.
    我们先来看看contentInsetAdjustmentBehavior这个枚举值:

    typedef NS_ENUM(NSInteger, UIScrollViewContentInsetAdjustmentBehavior) {
        UIScrollViewContentInsetAdjustmentAutomatic, 和scrollableAxes一样,scrollView会自动计算和适应顶部和底部的内边距并且在scrollView 不可滚动时,也会设置内边距.
        UIScrollViewContentInsetAdjustmentScrollableAxes, //自动计算内边距.
        UIScrollViewContentInsetAdjustmentNever, //不计算内边距,
        UIScrollViewContentInsetAdjustmentAlways, //根据safeAreaInsets 计算内边距
    } API_AVAILABLE(ios(11.0),tvos(11.0));

    self.navigationController.navigationBar.translucent = NO; 相当于self.automaticallyAdjustsScrollViewInsets = NO;self.edgesForExtendedLayout = UIRectEdgeNone;相当于 UIScrollViewContentInsetAdjustmentNever
  • 相关阅读:
    62. Unique Paths
    120. Triangle
    EBS预置文件作用收集整理
    ORA-20002: [WF_NO_USER] NAME=<name> ORIG_SYSTEM=NULL ORIG_SYSTEM_ID=NULL
    Oracle定义DES加密解密及MD5加密函数
    EBS获取附件URL
    Oracle EBS标准错误信息如何追踪 (Debug)
    更改EBS APPS 密码流程
    Oracle之物化视图
    Oracle EBS打补丁
  • 原文地址:https://www.cnblogs.com/lsh1234/p/12322129.html
Copyright © 2011-2022 走看看