title: Why is iOS not overriding background color if I use a custom color from xib?
body: <p>I have a xib. I have a view controller that loads the xib and adds it to its subview. The xib has the background color set from the xib file (from interface) to a <strong>CUSTOM COLOR SET</strong> from assets (created by me).
  Everything works fine.</p>
  <p>Now, inside my view controller, in viewDidLoad I want to override that background color with something else. The problem I found and it replicates 100% is that overriding doesn't do anything, unless I do it in viewDidAppear.</p>
  <p>So to sum up...</p>
  <ul>
  <li><p><strong>custom color</strong> background set from xib... overriding in viewDidLoad <strong>not working</strong>, overriding in viewDidAppear working</p>
  </li>
  <li><p>Xcode <strong>default color</strong> background set from xib (any other color except from assets custom colors)... overriding in viewDidLoad <strong>WORKS</strong>...</p>
  </li>
  </ul>
  <p>Why in the first case I cannot override the color and in the second I can?</p>
  <p>Is there a hidden feature that I'm missing here? You simply cannot override a view background color in viewDidLoad if the color set from xib is custom color, but if it's any other color... like white, red, black or w/e Xcode already has everything works as expected.</p>
  <p>If it has any impact... this view controller I'm talking about gets pushed on the navigation stack. But I don't see how this can have any impact.</p>
  <hr />
  <h3>Reproduction Steps:</h3>
  <p>To replicate this... create a new sample project... that only has one view controller in it. Next add a custom color via assets -&gt; new color set. Set the view controllers view background color from storyboard to the newly added color set. Then inside viewDidLoad change the background color of the view to something else... you will notice if you run the app it WON'T CHANGE if in storyboard there is a custom color set as background.</p>
  <p>Somehow the background custom color set from storyboard overrides happen behind the scenes after viewDidLoad and before viewDidAppear.</p>