+(void)initialize

{

    //初始化设置主题

    UINavigationBar *navBar = [UINavigationBar appearance];

    [navBar setBackgroundImage:[UIImage imageNamed:@"NavBar64"] forBarMetrics:UIBarMetricsDefault];

    //设置文字颜色

    NSMutableDictionary *dict = [NSMutableDictionary dictionary];

    navBar.tintColor = [UIColor whiteColor];

    

    dict[NSForegroundColorAttributeName] = [UIColor whiteColor];

    dict[NSFontAttributeName] = [UIFont systemFontOfSize:18];

    [navBar setTitleTextAttributes:dict];

    

    UIBarButtonItem *barButton = [UIBarButtonItem appearance];

    [barButton setTitleTextAttributes:dict forState:UIControlStateNormal];

    

}

 

相关文章:

  • 2022-02-02
  • 2022-12-23
  • 2021-04-06
  • 2021-12-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-12
  • 2022-12-23
  • 2022-02-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案