title: iOS Format String into minutes and seconds
body: <p>I am receiving a string from the YouTube JSONC api, but the duration is coming as a full number i.e 2321 instead of 23:21 or 2 instead of 0:02. How would I go about fixing this?</p>
  
  <p><a href="http://gdata.youtube.com/feeds/api/users/Apple/uploads?v=2&amp;alt=jsonc">JSON C</a></p>
  
  <p><strong>EDIT:</strong> </p>
  
  <pre><code>int duration = [videos valueForKey:@"duration"];
  int minutes = duration / 60;
  int seconds = duration % 60;
  
  NSString *time = [NSString stringWithFormat:@"%d:%02d", minutes, seconds];
  </code></pre>