title: IOS - Working with autolayout and drawRect
body: <p>I'm working with autolayout and I have a RoundView class (subview of UIButton) which drawRect method is:</p>
  
  <pre><code>- (void)drawRect:(CGRect)rect
  {
      CGContextRef context = UIGraphicsGetCurrentContext();
      CGFloat lineWidth = 0.0;
      CGContextSetLineWidth(context, lineWidth);
      CGContextSetFillColorWithColor(context, _currentBackgroundColor.CGColor);
      CGContextAddEllipseInRect(context, self.bounds);
      CGContextFillPath(context);
  
  }
  </code></pre>
  
  <p>Then I add it to self (a UIView), set its width and height using autolayout. Everything looks great.
  But when I change its size constraints (to have a bigger view), and call</p>
  
  <pre><code>[self layoutIfNeeded];
  </code></pre>
  
  <p>in an animation block, the circle pixels look bigger and ugly.</p>
  
  <p>Do I do this the correct way ?</p>
  
  <p><img src="https://i.stack.imgur.com/6EuRq.jpg" alt="correct">
  <img src="https://i.stack.imgur.com/wx20u.jpg" alt="incorrect"></p>