iOS 导航栏颜色设置

xiaoxiao2021-02-28  190

    //设置返回按钮颜色

    self.navigationController.navigationBar.tintColor = [UIColor whiteColor];

    //设置导航条背景颜色

    self.navigationController.navigationBar.barTintColor = ThemeColor;

    //设置导航栏标题背景颜色及字体

    [self.navigationController.navigationBar setTitleTextAttributes:

     @{NSFontAttributeName:[UIFont systemFontOfSize:16 * ScalW],

       NSForegroundColorAttributeName:[UIColor whiteColor]}];

转载请注明原文地址: https://www.6miu.com/read-24142.html

最新回复(0)