在我的手机 我的应用程序 捕获图像 功能并编辑捕获的图像。
我的意图是在图像选择器上添加一个叠加层,以直观地改变裁剪矩形的尺寸[我稍后会为此烦恼]
当图像选择器打开时, View 如下所示:
我需要知道用户何时单击该捕获按钮
我需要执行一些操作 当用户点击捕获按钮 ( but not when the image picker appears / dismiss
) just before use the image by click
在 use
至少 打印日志语句 NSLog(@" Capture Clicked");
最佳答案
假设您正在使用 UIImagePickerController。下面的方法将在用户选择/捕获图像后调用
- (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
selectedImage = [info objectForKey:UIImagePickerControllerEditedImage];
[self editImage:selectedImage];
//dismiss the picker
[picker dismissModalViewControllerAnimated:YES];
}
当然,如果您的图像处理方法需要很长时间才能返回,这将使您的应用程序无法响应。
关于iphone - 仅当在 iphone image-Picker 中完成捕获时单击捕获按钮时如何执行操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13133296/