title: Objective-C, border color not working with UIColor
body: <p>I can set the border color using the following code:</p>
  
  <pre><code>[[self.single layer] setBorderColor:[[UIColor colorWithRed:178.0f/255.0f green:178.0f/255.0f blue:178.0f/255.0f alpha:1.0] CGColor];
  </code></pre>
  
  <p>and it works just fine.  But I need to apply this to multiple borders, so I tried the following:</p>
  
  <p>.h </p>
  
  <pre><code>@property (weak, nonatomic) UIColor *appColor;
  </code></pre>
  
  <p>.m</p>
  
  <p>within <code>viewDidLoad</code></p>
  
  <pre><code>self.appColor = [UIColor colorWithRed:178.0f/255.0f green:178.0f/255.0f blue:178.0f/255.0f alpha:1.0];
  </code></pre>
  
  <p>and then later, where the previous color assignment was</p>
  
  <pre><code>[[self.single layer] setBorderColor:[self.appColor CGColor]];
  </code></pre>
  
  <p>But this does not work - the border comes out black (regardless of what I set for <code>self.appColor</code>).  I have also tried <code>[[self.single layer] setBorderColor:self.appColor.CGColor];</code> with no success.  How can I define a UIColor variable just once, but use it to assign border colors in multiple places?</p>