在我的应用程序中,我需要从照片库中选择一个图像,然后用户应该能够裁剪或缩放图像。谁能帮帮我?
发布于 2010-11-08 12:30:48
UIImagePickerController应该可以做到这一点。
UIImagePickerController *picker = [UIImagePickerController new];
picker.delegate = self;
picker.allowsEditing = YES;
[yourViewController presentModalViewController:picker];然后我们需要实现委托方法:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
UIImage *image = [info objectForKey:UIImagePickerControllerEditedImage];
}发布于 2010-11-08 12:32:48
您可以使用UIImagePickerController让用户从照片库中选择图像。
发布于 2010-11-26 00:21:03
@denizen The [yourViewController presentModalViewController:picker];需要一个动画:BOOL。
喜欢:[yourViewController presentModalViewController:picker animated:YES];
https://stackoverflow.com/questions/4121261
复制相似问题