zoukankan      html  css  js  c++  java
  • Navbar和Tabbar常用设置

    1.navBar

         [self.navigationController.navigationBar setBackgroundImage:navBarImage forBarMetrics:UIBarMetricsDefault];
         [self.navigationController.navigationBar setShadowImage:navBarImage];
         [[UINavigationBar appearance]setBarTintColor:col];//导航栏颜色
         nvc1.navigationBar.tintColor=[UIColor grayColor];//字体颜色
         [[UINavigationBar appearance]setTintColor:[UIColor grayColor]];////字体颜色
    
         if ([[[UIDevice currentDevice]systemVersion]doubleValue]>7.0) {
                NSLog(@">7.0");
                // 设置导航默认标题的颜色及字体大小
                self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor blackColor],NSFontAttributeName : [UIFont
    
                boldSystemFontOfSize:18]};
            }else{
                NSLog(@"<=7.0");
                // 设置导航默认标题的颜色及字体大小
                self.navigationController.navigationBar.titleTextAttributes = @{UITextAttributeTextColor: [UIColor blackColor],UITextAttributeFont : [UIFont                  
    
                 boldSystemFontOfSize:18]};
            }

    2.tabbar

        nav1.tabBarItem.title=@"听音乐";
        nav1.tabBarItem.selectedImage=[[UIImage imageNamed:@"music_s.png"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
        nav1.tabBarItem.image=[[UIImage imageNamed:@"music.png"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
        nav1.tabBarItem.badgeValue=@"love";
        rootTab.viewControllers=@[nav1,nav2,nav3,nav4];
        self.tabBarController.tabBar.hidden=before;



    3.状态栏
            [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];

  • 相关阅读:
    Linux命令格式与修改文件权限的命令
    Linux 文件基本属性
    Linux 系统目录结构
    Linux 系统启动过程
    Linux在线学习模拟器
    jQuery做的自定义选项卡
    jQuery做的可编辑表格
    海康解码器对接总结(java 版)
    Java线程总结(二)
    Java线程总结(一)
  • 原文地址:https://www.cnblogs.com/sunjianfei/p/6041600.html
Copyright © 2011-2022 走看看