modal設置和push設置是不一樣的app
//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]}];