/*设置图片的选取*/
- (IBAction)InsertImg:(id)sender {
UIImagePickerController *pc = [[UIImagePickerControlleralloc] init];//创建图片选取器
pc.sourceType =UIImagePickerControllerSourceTypePhotoLibrary;//设置图片选取的库
pc.delegate = self;//设置代理 UINavigationControllerDelegate,UIImagePickerControllerDelegate
[selfpresentViewController:pc animated:YEScompletion:nil];//弹出了图像选取视图控制器
}
/*图片选取代理*/
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
self.imgV.image=[infoobjectForKey:UIImagePickerControllerOriginalImage];
[picker dismissViewControllerAnimated:YEScompletion:nil];
}