title: Swift popToViewController
body: <p>Good day guys, I'm learning Swift, needed some help here.</p>
  
  <p>The user are signing up and selected their image. Upon dismissing the image picker, I would like to have the ComposeViewController appear. </p>
  
  <p>Here is the code:</p>
  
  <pre><code>func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: NSDictionary!) {
      let pickedImage:UIImage = info.objectForKey(UIImagePickerControllerOriginalImage) as UIImage
  
      //Scale Down Image
      let scaledImage = self.scaleImageWith(pickedImage, and: CGSizeMake(100,100))
  
      let imageData = UIImagePNGRepresentation(scaledImage)
  
      let imageFile:PFFile = PFFile(data: imageData)
  
      PFUser.currentUser().setObject(imageFile, forKey: "profileImage")
      PFUser.currentUser().saveInBackgroundWithTarget(nil, selector: nil)
  
      picker.dismissViewControllerAnimated(true, completion: nil)
  
      //this is the line seems to have problem.
      self.navigationController?.popToViewController(ComposeViewController, animated: true)
  }
  </code></pre>
  
  <p>Then I got these error:
  ComposeViewController.Type' is not convertible to 'UIViewController
  Expected member name or constructor call after type name</p>
  
  <p>It has suggestion to fix by putting () after ComposeViewController but then it gives out more errors after fixing.</p>
  
  <p>Hope someone could help. Thanks! :-)</p>