zoukankan      html  css  js  c++  java
  • 设置导航栏nav全透明

      设置导航栏nav全透明

    - (void)viewDidLoad {里面添加

    swift:版本

    // 1、设置视图背景颜色

    //    self.view.backgroundColor = UIColor(white: 0.25, alpha: 1.0)

    //

    //    // 2、设置导航栏标题属性:设置标题颜色

    //    self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName:UIColor.whiteColor()]

    //    // 3、设置导航栏前景色:设置item指示色

    //    self.navigationController?.navigationBar.tintColor = UIColor.whiteColor()

    //

    //    // 4、设置导航栏半透明

    //    self.navigationController?.navigationBar.translucent = true

    //

    //    // 5、设置导航栏背景图片

    //    self.navigationController?.navigationBar.setBackgroundImage(UIImage(), forBarMetrics: UIBarMetrics.Default)

    //

    //    // 6、设置导航栏阴影图片

    //    self.navigationController?.navigationBar.shadowImage = UIImage()

     

     

    OC:版本

      

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

    [self.navigationController.navigationBar setTranslucent:true];

    [self.navigationController.navigationBar setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
    [self.navigationController.navigationBar setShadowImage:[[UIImage alloc] init]];

  • 相关阅读:
    什么是PV UV PR值
    手工测试了各个搜索引擎对博客文章的收录
    Linux 常用命令
    部分linux命令详解
    左右滑屏的实现
    网络资源下载时断点续传的实现
    MYSQL5.5.37win32.msi 这个版本得程序包谁有吗 可以给我一下吗?
    Linux(CentOS6.5) 开放端口,配置防火墙
    centos7 下出现 yum list 报错 还有yum groupolist 查询软件组列表报错
    linux命令(1):ls命令
  • 原文地址:https://www.cnblogs.com/YangFuShun/p/6093423.html
Copyright © 2011-2022 走看看