title: Color Variables in Objective C
body: <p>How do I set and reuse a color variable in Obj C? I am trying to set a reusable color value as in this question:</p>
  
  <p><a href="https://stackoverflow.com/questions/10032393/change-background-color-with-a-variable-ios">Change background color with a variable iOS</a></p>
  
  <p>but am unsuccessful.</p>
  
  <pre><code> UIColor *lightGrayHeader = [UIColor colorWithRed:246/255.f green:239/255.f blue:239/255.f alpha:1.0];
  
   self.view.backgroundColor = [UIColor lightGrayHeader];
  </code></pre>
  
  <p>Returns an error: "Initializer element is not a compile-time constant."</p>
  
  <p>Thanks for your ideas!</p>