title: Swift : boundingRectWithSize return wrong height for a multiline label
body: <p>I'm using an extension on the String class to get the height needed to display my string in a multiline label.</p>
  
  <pre><code>extension String {
      func heightWithConstrainedWidth(width: CGFloat, font: UIFont) -&gt; CGFloat {
          let constraintRect = CGSize(width: width, height: CGFloat.max)
  
          let option = NSStringDrawingOptions.UsesFontLeading.union(.UsesLineFragmentOrigin)
  
          let boundingBox = self.boundingRectWithSize(constraintRect, options: option, attributes: [NSFontAttributeName: font], context: nil)
          print("ex width \(boundingBox.width)")
          print("ex height \(boundingBox.height)")
          return boundingBox.height
      }
  }
  </code></pre>
  
  <p>I'm calling it in <code>heightForRowAtIndexPath</code> </p>
  
  <pre><code>let myRandomString = "My baby looks like she's ashamed and wants to apologise for something bad she did."
  let labelWidth = UIScreen.mainScreen().bounds.width-16
  let labelHeight = myRandomString.heightWithConstrainedWidth(labelWidth,font: UIFont.boldSystemFontOfSize(17))
  </code></pre>
  
  <p>and I get :</p>
  
  <pre><code>ex width 359.0
  ex height 40.57421875
  </code></pre>
  
  <p>But when I use the view debuging option of xcode I get this :
  <a href="https://i.stack.imgur.com/FH7V7.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FH7V7.jpg" alt="enter image description here"></a></p>
  
  <p>And this is how my UILabel is setup :
  <a href="https://i.stack.imgur.com/QKKKb.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QKKKb.jpg" alt="enter image description here"></a></p>
  
  <p>As you can see my width is correct (I'm forcing it) but my height is incorrect and I can't figure out why.</p>
  
  <p>Thanks and regards,
  Eric</p>