title: What is difference between White Color set from storyboard and UIColor.whiteColor()?
body: <p>For a <code>UIButton</code>, I have set its background color as <code>White Color</code> in storyboard. I want to toggle the properties of the button depending on the current <code>backgroundColor</code> of my button.</p>
  
  <pre><code>func toggleButton(button: UIButton) {
       if button.backgroundColor == UIColor.whiteColor() {
            button.backgroundColor = UIColor.myDesiredColor()
            button.tintColor = UIColor.whiteColor()
       }else {
            button.backgroundColor = UIColor.whiteColor()
            button.tintColor = UIColor.myDesiredColor()
       }
  }
  </code></pre>
  
  <p>The check for <code>button.backgroundColor == UIColor.whiteColor()</code> never returns <code>true</code> and after debugging, I found out that value of <code>White Color</code> set from <code>Storyboard</code> is different from value of <code>UIColor.whiteColor()</code>.</p>
  
  <p><strong>Debugging result:</strong><br>
  Storyboard White Color - <code>UIDeviceRGBColorSpace 1 1 1 1</code><br>
  <code>UIColor.whiteColor()</code> - <code>UIDeviceWhiteColorSpace 1 1</code></p>
  
  <p>I have found out workaround for my code to work as expected.</p>
  
  <p><strong>My real confusion are:</strong>  </p>
  
  <ul>
  <li>What is difference between these two values?</li>
  <li>Why does Xcode have two different value of same color in storyboard and code?</li>
  <li>How do these two different white colors differ from each other?</li>
  </ul>