title: Not Getting Correct Line Count For UILabel
body: <pre><code> value = UILabel(frame: CGRect(x: 5 ,y: 5, width:Int(self.view.frame.width - 140) ,height: 16 ))
          value.numberOfLines = 0
          value.font = UIFont.systemFont(ofSize: 14.0)
         value.lineBreakMode = .byWordWrapping
          value.text = ((items["comment"] as? String) ?? "")!
          value.setLineHeight(lineHeight: CGFloat(1))
          var lineCount = 0;
          let textSize = CGSize(width: value.frame.size.width, height: CGFloat(Float.infinity));
          let rHeight = lroundf(Float(value.sizeThatFits(textSize).height))
          let charSize = lroundf(Float(value.font.lineHeight));
  
          lineCount = rHeight/charSize
          print(lineCount)
         }
  </code></pre>
  
  <p>When Trying to get number of lines in that UILabel. it is always giving me one more that the actual line count..</p>
  
  <pre><code>extension UILabel {
  func setLineHeight(lineHeight: CGFloat) {
      let paragraphStyle = NSMutableParagraphStyle()
      paragraphStyle.lineSpacing = 1.0
      paragraphStyle.lineHeightMultiple = lineHeight
      paragraphStyle.alignment = self.textAlignment
  
      let attrString = NSMutableAttributedString(string: self.text!)
      attrString.addAttribute(NSFontAttributeName, value: self.font, range: NSMakeRange(0, attrString.length))
      attrString.addAttribute(NSParagraphStyleAttributeName, value:paragraphStyle, range:NSMakeRange(0, attrString.length))
      self.attributedText = attrString
  }
  </code></pre>
  
  <p>}</p>