title: How to Resize image in Swift?
body: <p>I am making an app for iOS, using <strong>Swift</strong> and Parse.com</p>
  
  <p>I am trying to let the user select a picture from an image picker and then resize the selected image to 200x200 pixels before uploading to my backend.</p>
  
  <p>Parse.com have a tutorial for an Instagram copy app called "AnyPic" which gives this code for resizing images, but it is in Objective-C....</p>
  
  <pre><code>// Resize the image to be square (what is shown in the preview)
  UIImage *resizedImage = [anImage resizedImageWithContentMode:UIViewContentModeScaleAspectFit
          bounds:CGSizeMake(560.0f, 560.0f)
          interpolationQuality:kCGInterpolationHigh];
  // Create a thumbnail and add a corner radius for use in table views
  UIImage *thumbnailImage = [anImage thumbnailImage:86.0f
          transparentBorder:0.0f
          cornerRadius:10.0f
          interpolationQuality:kCGInterpolationDefault];
  </code></pre>
  
  <p><strong>How would I create a 200x200px version of the selected picture (to then upload) in Swift?</strong></p>
  
  <p><strong>And, what is the thumbnailImage function doing?</strong></p>