Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7572725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:59:50+00:00 2026-05-30T15:59:50+00:00

This code can change color of a UINavigationBar everywhere within the application. However, I

  • 0

This code can change color of a UINavigationBar everywhere within the application. However, I noticed that it does not change the UIColor of the UINavigationBar used by UINavigationController (mine comes from a UIStoryboard).

UIColor* navBarColor = [UIColor colorWithRed:arc4random()%100/100.0 
                                       green:arc4random()%100/100.0 
                                        blue:arc4random()%100/100.0 
                                       alpha:1];
[[UINavigationBar appearance] setTintColor:navBarColor];

[[UINavigationBar appearance] setBarStyle:UIBarStyleBlackTranslucent];
[[UINavigationBar appearance] setAlpha:0.7];

Is there a way to access the appearance object of a UINavigationController's navigation bar? I know how to set tints of individual controllers, but I want to have a global control over how they look.

Update:
This was my mistake, the code does change the UIColor of all UINavigationBars, but it requires the root navigation controller to be covered and uncovered(for example presenting a modal view controller), then it will re-draw itself with new UIColors!

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T15:59:52+00:00Added an answer on May 30, 2026 at 3:59 pm

    The complete solution which changes the navbar color instantly and remembers the preference for subsequent launches can be found here:
    iPhone iOS how to redraw UINavigationBar on demand?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

from this code will show in original color how can i change it to
How can I change the master volume level? Using this code [DllImport (winmm.dll)] public
I have some code to change how listbox act. I can change the color
I am writing an application where the user can change the color of the
I'm writing code this week to dynamically change the color of images. As long
I can't change the color of my UINavigationBar. I've put a navigation bar manually
Can't understand why this code changes color of DIV element to blue, but doesn't
Can i change this code to somethign like the below code? <style> .FirstLetter:first-letter{font-family: arial;
I would like to change this code so that if the textName.text contains the
This code changes the color of the first word found in that class. Works

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.