I have UIImagePickerController which is choosing photo or video from gallery, after selecting item, I want to determine which one is chosen, photo or video
func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) {
let mediaType = info[UIImagePickerControllerMediaType]
}
I've found this: How to select any Video or Movie file from UIImagePickerController
but could not translate to Swift:
if (CFStringCompare ((__bridge CFStringRef) mediaType, kUTTypeMovie, 0) == kCFCompareEqualTo) {
}
thank you in advance