//1创建UIImagePickerController对象
UIImagePickerController *pickerVC = [[UIImagePickerController alloc] init];
//2.设置选择图片的资源地
[pickerVC setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
//3.允许编辑
pickerVC.allowsEditing = YES;
//4.设置代理
[pickerVC setDelegate:self];
//5.弹出相册
[self presentViewController:pickerVC animated:YES completion:nil];
//6.释放所有权
[pickerVC release];