title: Convert CGSize to CGFloat and use that to size a RoundRectButton
body: <p>I'm trying to find the physical pixel size of a string of text. I then want to use this size to set the length of a roundRectButton. The method I'm using to get the length however returns a CGSize. How do I convert that to a CGFloat? Alternatively perhaps someone can suggest a totally different way to accomplish this.</p>
  
  <p>This is the code I have currently:</p>
  
  <pre><code>// Note: tagAsString is a string of Tag names (Example "tag1, tag2, tag3")
  // Note: Code to set this is not relevant to the question.
  
  // get length of tagsAsString.
  CGSize tagStringLength = [tagsAsString sizeWithFont:[UIFont fontWithName:@"Helvetica-Bold" size:13.0] forWidth:100.0 lineBreakMode:UILineBreakModeTailTruncation];
  
  // size button to fit length of string
  // Note: spotTags is a roundRectButton
  cell.spotTags.frame = CGRectMake(96, 33, tagStringLength, 25);
  
  // set the title of the roundRectButton to the tag string
  [cell.spotTags setTitle:tagsAsString forState:UIControlStateNormal];
  </code></pre>
  
  <p>As you can see above I'm using the CGRectMake method which takes 4 arguments as CGFloat. I am however passing in a CGSize which is causing a run-time error.</p>