title: how to capture camera with UIImagePickerController in swift?
body: <p>I'm trying use <code>UIImagePickerController</code> in swift but isn't work...</p>
  
  <p>my ViewController:</p>
  
  <pre><code>class ViewController: UIViewController {
  
  @IBOutlet var imag : UIView = nil
  @IBAction func capture(sender : UIButton) {
      println("Button capture")
      if UIImagePickerController.isSourceTypeAvailable(UIImagePickerControllerSourceType.Camera)
      {
          var imag = UIImagePickerController()
          imag.delegate = self
          imag.sourceType = UIImagePickerControllerSourceType.Camera;
         imag.mediaTypes = kUTTypeImage
          imag.allowsEditing = false
  
          self.presentViewController(imag, animated: true, completion: nil)
  
      }
     }   
  }
  </code></pre>
  
  <p>I have errors in following line of code</p>
  
  <pre><code>imag.delegate = self 
  (Type'ViewControlles does confoorm to protocol 'UIImagePickerControllerDelegate')
  imagePicker.mediaTypes = kUTTypeImage   
  (use of unresolved identifier kUTTypeImage)
  </code></pre>
  
  <p>I have read that <code>kUTTypeImage</code> cant use in swift.but don't know, i am using bad this functions. Any help?</p>
  
  <p>Thanks!!</p>