title: Custom UIView Subclass's drawRect not being called inside UITableViewCell
body: <p><strong>Background:</strong>
  I have a subclass of <code>UITableViewCell</code> whose layout is defined as a prototype cell in a storyboard. One of the cell's <code>IBOutlets</code> is a subclass of <code>UIView</code> I made called <code>BorderedProfileImageView</code>. This class's <code>drawRect:</code> function is overridden as follows:</p>
  
  <pre><code>- (void)drawRect:(CGRect)rect
  {
      CGContextRef context = UIGraphicsGetCurrentContext();
      CGContextSetStrokeColorWithColor(context, [[UIColor blueColor] CGColor]);
      CGContextSetLineWidth(context, 1.f);
      CGFloat halfWidth = self.bounds.size.width/2;
      NSInteger radius = sqrt(pow(halfWidth, 2) + pow(halfWidth, 2)) - 8.5;
      CGContextAddArc(context,self.bounds.size.width/2,self.bounds.size.height/2,radius,0,2*3.1415926535898,1);
      CGContextStrokePath(context);
  }
  </code></pre>
  
  <p>This adds a blue ring to the UIView.</p>
  
  <p><strong>Problem:</strong><br>
  The blue ring never appears, and <code>BorderdProfileImageView</code>'s <code>drawRect:</code> function never gets called. The cell still draws, the <code>UIImageView</code> which is inside the <code>BorderdProfileImageView</code> gets drawn. I do call <code>setNeedsDisplay</code> on the <code>BorderedProfileImageView</code> when setting up the cell.</p>
  
  <p>Why is <code>drawRect:</code> not getting called?</p>