标签:io ar 数据 div cti sp on c res
1、// 1.判断数据源是否可用
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
// 2.打开相册
UIImagePickerController *ivPic = [[UIImagePickerController alloc] init];
ivPic.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
// 3.设置代理
ivPic.delegate = self;
// 4.显示图片选择器
[self presentViewController:ivPic animated:YES completion:nil];
}
{
// 1.取出选中的图片
UIImage *image = info[UIImagePickerControllerOriginalImage];
// 2.设置图片到imageview上
self.iconView.image = image;
// 3.关闭图片选择器
[picker dismissViewControllerAnimated:YES completion:nil];
}
图片选择器(UIImagePickerController)
标签:io ar 数据 div cti sp on c res
原文地址:http://www.cnblogs.com/bluceZ/p/3935999.html