How to change navigation bar color in iOS 7 or 6?

后端 未结 16 1764
你的背包
你的背包 2020-12-07 14:33

I want to change the color of the navigation bar color, but I\'m not sure whether or not I should change the tint or the background. I know iOS 7 is going for a more flat de

16条回答
  •  南方客
    南方客 (楼主)
    2020-12-07 15:12

        you can add bellow code in appdelegate.m .if your app is navigation based
    
        // for background color
       [nav.navigationBar setBarTintColor:[UIColor blueColor]];
    
        // for change navigation title and button color
        [[UINavigationBar appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor],
        NSForegroundColorAttributeName,               
        [UIFont fontWithName:@"FontNAme" size:20],
        NSFontAttributeName, nil]];
        [[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
    

提交回复
热议问题