title: Get CGSize from NSString
body: <p>In my web service response I get the value of one of my JSON key as follows:</p>
  
  <pre><code>{
  dimensions = "1200, 800";
  displayName = "something";
  displayNumber = 1;
  }
  </code></pre>
  
  <p>I need to convert the dimensions string to a CGSize variable and I use the following code. I got the JSON dictionary to an NSDictionary name wardsDictionary and did the following:</p>
  
  <pre><code>NSString *dimensionsString = (NSString *)[wardsDictionary objectForKey:@"dimensions"];
  CGSize wardDimensions = CGSizeFromString(dimensionsSizeString);
  NSLog(@"the dimensions string: %@",dimensionsString);
  NSLog(@"the width: %@ and height:%@", wardDimensions.width, wardDimensions.height);
  </code></pre>
  
  <p>And the result was:</p>
  
  <pre><code>the dimensions string: "1200, 800"
  the width: 0.0000 and height:0.0000
  </code></pre>
  
  <p>Now what I am trying to do here is to get components separated by "," and get the CGSize variable from it.
  But is there a good way to actually achieve this directly?</p>