我找到了一些相关的帖子:
UIImagePickerControllerDelegate to Swift?
how to capture camera with UIImagePickerController in swift?
但它们都不适用于beta 3,因为UIImagePickerControllerDelegate已更改:
func imagePickerController(picker: UIImagePickerController!, didFinishPickingMediaWithInfo info: [NSObject : AnyObject]!)
我的问题是如何从info Array获取UIImage对象?感谢
答案 0 :(得分:5)
它是一个字典,用UIImagePickerControllerOriginalImage
let image = info[UIImagePickerControllerOriginalImage] as UIImage