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];

  • 相关阅读:
    oracle的nvl函数的用法
    简单实用的MD5加密算法
    oracle触发器使用笔记
    Html学习
    连接字符串
    oracle触发器使用笔记2
    oracle中如何给有空值的数据排序
    Zend Frame 添加Smarty模板引擎
    HDU 2464 A Pair of Graph
    POJ 1466 Girls and Boys
  • 原文地址:https://www.cnblogs.com/sunjianfei/p/6041600.html
Copyright © 2011-2022 走看看