title: How to get CGFloat/CGSize based on String length?
body: <p>I have a UIView, which acts as a container and the width of this container needs to change dynamically based on the longest String. So I want to get CGFloat/CGSize based on String length, is it still possible ?</p>
  
  <p>The method which seems most helpful is now depreciated... </p>
  
  <pre><code>myStringSize : CGSize  = [longestString sizeWithFont:myFont 
                         constrainedToSize:maximumSize 
                         lineBreakMode:self.myLabel.lineBreakMode];
  </code></pre>
  
  <p>Rather than basing it on a label I would like to base it on a String</p>