title: Multiline UILabel with padding in autolayout, in UITableView
body: <p>I have a UILabel in a UITableView that should be a maximum of 2 lines and have a bit of padding around it (7 left and right and 2 top and bottom). I'm using autolayout and targeting only iOS6 and above. All views are being created and added programatically.</p>
  
  <p>I've subclassed my UILabel, here's the <code>init</code> method:</p>
  
  <pre><code>- (id)init
  {
  self = [super init];
  
  self.translatesAutoresizingMaskIntoConstraints = NO;
  self.numberOfLines = 2;
  self.backgroundColor = UIColorFromARGB(0x99000000);
  self.textColor = [UIColor whiteColor];
  self.font = [UIFont boldSystemFontOfSize:14.0f];
  
  return self;
  }
  </code></pre>
  
  <p>If I add this in, I get the right padding, but it makes it just one line:</p>
  
  <pre><code>- (void)drawTextInRect:(CGRect)rect {
  UIEdgeInsets insets = {2, 7, 2, 7};
  return [super drawTextInRect:UIEdgeInsetsInsetRect(rect, insets)];
  }
  </code></pre>
  
  <p>I've seen this answer a few times, but it doesn't work for me (no effect):</p>
  
  <pre><code>- (CGRect)textRectForBounds:(CGRect)bounds limitedToNumberOfLines:(NSInteger)numberOfLines
  {
  UIEdgeInsets insets = {2, 7, 2, 7};
      return [super textRectForBounds:UIEdgeInsetsInsetRect(bounds,insets) limitedToNumberOfLines:numberOfLines];
  }
  </code></pre>
  
  <p>Does it make a difference that its in a table view? Any help would be appreciated.</p>