title: How to set correctly the line height of UILabel with an AttributedString?
body: <p>I have a <code>UILabel</code> which uses an Attributed String. I want to have its line height to be exactly the size of the font size, not a pixel bigger. However, a top and bottom padding are being added. See image below: </p>
  
  <p><img src="https://i.stack.imgur.com/uTelz.png" alt="enter image description here"></p>
  
  <p>This is my code to create the label. </p>
  
  <pre><code>NSDictionary *basicAttributes = @{NSForegroundColorAttributeName: [UIColor whiteColor], NSBackgroundColorAttributeName: [UIColor blueColor]};
  
  NSMutableDictionary *attributes = [NSMutableDictionary dictionaryWithDictionary:basicAttributes];
  
  UIFont *font = [UIFont fontWithName:@"AvenirNext-Regular" size:20.0];
  [attributes setObject:font forKey:NSFontAttributeName];
  
  NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
  paragraphStyle.lineHeightMultiple = 1.0f;
  [attributes setObject:paragraphStyle forKey:NSParagraphStyleAttributeName];
  
  self.helloWorldLabel.attributedText = [[NSMutableAttributedString alloc] initWithString:@"Hola" attributes:attributes];
  </code></pre>
  
  <h2>Attempts</h2>
  
  <p>I have tried to call <code>sizeToFit</code> after setting the attributedText without success. </p>
  
  <pre><code>[self.helloWorldLabel sizeToFit];
  </code></pre>
  
  <p>I have played with other attributes of <code>NSMutableParagraphStyle</code> such as <code>lineSpacing</code> without success.</p>
  
  <pre><code>paragraphStyle.lineSpacing = 0.0f;
  </code></pre>
  
  <p>What am I missing? </p>
  
  <p>Thanks in advanced</p>