UIImagePickerControllerSourceType sourceType = UIImagePickerControllerSourceTypeCamera;
if (![UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]) //判断相机是否可用,不可以去相册获取
sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
点击相册中的图片 货照相机照完后点击use 后触发的方法
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
点击cancel 调用的方法
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker