ios 状态栏、菜单颜色设置 modal push tabBar navBar toolBar

modal设置和push设置是不同的

//modal  这个是UIBar
 UIView *statusBarView=[[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 20)];
    
    UIColor * color=[UIColor colorWithRed:220/255.0 green:20/255.0 blue:60/255.0 alpha:1];
    statusBarView.backgroundColor=color;
    [self.view addSubview:statusBarView];
    //不显示电池
    //[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:NO];


//push和菜单颜色设置

 //图标点击颜色
    self.tabBar.tintColor=[UIColor colorWithRed:220/255.0 green:20/255.0 blue:60/255.0 alpha:1];
    
    UIColor *color=[UIColor colorWithRed:220/255.0 green:20/255.0 blue:60/255.0 alpha:1];
    //导航条颜色
    [[UINavigationBar appearance] setBarTintColor:color];   //@{}代表Dictionary
    //导航条字体颜色
    [[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];


你可能感兴趣的:(ios 状态栏、菜单颜色设置 modal push tabBar navBar toolBar)