title: How to check if a UIView's backgroundColor is clearColor?
body: <p>This doesn't work:</p>
  
  <pre><code>if([myView.backgroundColor isEqual:[UIColor clearColor]])
     NSLog("Background is clear");
  else
     NSLog("Background is not clear");
  </code></pre>
  
  <p>P.S: To reproduce the case, drag a uiview in interface builder, set it's background color to clear color from interface builder. Set an outlet of the view, then compare it in viewDidLoad using the code above.</p>
  
  <p>Here is the link of the test project: <a href="https://drive.google.com/file/d/0B_1hGRxJtrLjMzUyRHZyeV9SYzQ/view?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/file/d/0B_1hGRxJtrLjMzUyRHZyeV9SYzQ/view?usp=sharing</a></p>
  
  <p>Here is the Snapshot of Interface Builder:
  <a href="https://i.stack.imgur.com/wcZtw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wcZtw.png" alt="enter image description here"></a></p>