How do I use the switch statement on UIImagePickerControllerMediaType
?
The following example throws the strange compiler error:
Expression pattern of type 'CFString' cannot match values of type 'CFString'.
func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : AnyObject]) {
switch info[UIImagePickerControllerMediaType] as! CFString {
case kUTTypeImage:
break
default:
break
}
}