how to capture camera with UIImagePickerController in swift?

You should also import MobileCoreServices in the controller:

import MobileCoreServices 

and then put the type inside square brackets like this:

image.mediaTypes = [kUTTypeImage]

Swift 2.0 and Higher

image.mediaTypes = [kUTTypeImage as String]

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)