zoukankan      html  css  js  c++  java
  • iOS与导航相关的都在这

        // 设置导航背景图片 (一旦设置背景图片(变为不透明),透明层不起作用)

        [self.navigationBar setBackgroundImage:[UIImage imageNamed:@"icon_app_nav"] forBarMetrics:UIBarMetricsDefault];

        // navigationBar背景色(通过透明层会显示)

    //    self.navigationBar.backgroundColor = [UIColor yellowColor];

        

        // 设置背景颜色(在透明层之上)

    //    [self.navigationBar setBarTintColor:ThemeColor];

        

        // 设置title标题中的颜色(title字体颜色)

        UIFont *font = PingFangMediumFontSize(18.f);

        [self.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor], NSFontAttributeName:font}];

        

        // 设置返回按钮的颜色 (navigationBarItem字体颜色)

        [self.navigationBar setTintColor:[UIColor whiteColor]];

        

        // 设置导航栏透明 (yes 透明  no 不透明)

        self.navigationBar.translucent = NO;

        

    /************************导航相关****************************/

    //    (导航不透明,控制器View(0,64)开始)

    //   (导航透明,edgesForExtendedLayout = UIRectEdgeAll,控制器View(0,0)开始)

    //   (导航透明,edgesForExtendedLayout = UIRectEdgeNone,控制器View(0,64)开始)

    //    1.导航不透明 设置self.edgesForExtendedLayout = UIRectEdgeAll,控制器View(0,64)开始

    //    2.导航不透明 设置self.edgesForExtendedLayout = UIRectEdgeNone,控制器View(0,64)开始

    //    3.导航透明   设置self.edgesForExtendedLayout = UIRectEdgeAll,控制器View(0,0)开始

    //    4.导航透明   设置self.edgesForExtendedLayout = UIRectEdgeNone,控制器View(0,64)开始

        

    //    automaticallyAdjustsScrollViewInsets = YES (是否自动适应滚动视图的内边距)

    //    (iOS11此方法过期,scrollView的contentInsetAdjustmentBehavior属性取代)

    //    scrollView会自动计算和适应顶部和底部的内边距并且在scrollView 不可滚动时,也会设置内边距.

    //    UIScrollViewContentInsetAdjustmentAutomatic

    //    自动适应边距

    //    UIScrollViewContentInsetAdjustmentScrollableAxes,

    //    和automaticallyAdjustsScrollViewInsets=NO有着同样的效果,不计算内边距

    //    UIScrollViewContentInsetAdjustmentNever,

    //    根据safeAreaInsets (安全区域)计算内边距

    //    UIScrollViewContentInsetAdjustmentAlways

    /************************导航相关****************************/

  • 相关阅读:
    SpringMVC 配置式开发-HandlerMapping的执行流程(八)
    SpringMVC 配置式开发-BeanNameUrlHandlerMapping(七)
    SpringMVC路径问题回顾,加斜杠和不加斜杠的问题(六)
    web.xml 注册中央调度器Url-pattern 要注意的地方(五)
    SpringMVC执行流程(四)
    Spring 特点
    monkeyrunner操作多个设备的例子
    ant安装、环境变量配置及验证
    二进制、十六进制转换表
    Android源码开发利器——Java源码调试(基于4.1.2)
  • 原文地址:https://www.cnblogs.com/yang-shuai/p/9269636.html
Copyright © 2011-2022 走看看