title: Use of unresolved identifier 'boundingRect'
body: <p>I have very weird problem with below code.   </p>
  
  <pre><code>extension String {
          func height(withConstrainedWidth width: CGFloat, font: UIFont) -&gt; CGFloat {
              let constraintRect = CGSize(width: width, height: .greatestFiniteMagnitude)
              let boundingBox = boundingRect(with: constraintRect, options: .usesLineFragmentOrigin, attributes: [NSAttributedStringKey.font: font], context: nil)
  
              return ceil(boundingBox.height)
          }
  }
  </code></pre>
  
  <p>It always throwing below compiler error. </p>
  
  <p><a href="https://i.stack.imgur.com/b0qMI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/b0qMI.png" alt="enter image description here"></a></p>
  
  <p>But if I use <code>self.boundingRect</code> then it compile successfully and run the application but after launched app on simulator it automatically revert to again <code>boundingRect</code> (Removing <strong>self</strong>).</p>
  
  <p>So everytime I need to add <code>self.</code> to execute app.</p>