zoukankan      html  css  js  c++  java
  • UIAppearance

    #pragma mark - 定制全局的Bar

    -(void)customAllBar{

        //定制所有的Bar的背景颜色和标题外观

        [UINavigationBar appearance].barTintColor = [UIColor lightGrayColor];

        //NSDictionary :@{属性名:对象}

        [UINavigationBar appearance].titleTextAttributes = @{NSFontAttributeName : [UIFont systemFontOfSize:40],NSForegroundColorAttributeName : [UIColor yellowColor]                                                       };

    }

    #pragma mark - 定制全局的ToolBarButtonItem

    -(void)customToolBarButtonItem{

        //修改的是NavigationBar和Toolbar上得所有不是图片的NavigationItem的背景

        //[[UIBarButtonItem appearance] setBackButtonBackgroundImage:[UIImage imageNamed:@"header_bg"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];

        

        //修改所有在UIToolbar出现过的UIBarButtonItem把他们的背景变成Blue

        [[UIBarButtonItem appearanceWhenContainedInInstancesOfClasses:@[[UIToolbar class]] ] setTintColor:[UIColor blueColor]];

        

    }

  • 相关阅读:


    django 认证系统--3
    django 认证系统--2
    django 认证系统--1


    关于二叉树
    [GeeksForGeeks] Remove all half nodes of a given binary tree
    [LintCode] Letter Combinations of a Phone Number
  • 原文地址:https://www.cnblogs.com/W-Kr/p/5273313.html
Copyright © 2011-2022 走看看