ios 如何知道相机是否完成拍照
How to know Camera Is completed taking taking picture In ios
我使用图像选择器控制器呈现相机,图像拍摄后进入结束模式,所以我希望代表在相机完成拍照时调用。
就像通过 NSNotificationCenter 一样。
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate=self;
picker.allowsEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentViewController:picker animated:YES completion:NULL];
试试这个:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleNotification:) name:@"_UIImagePickerControllerUserDidCaptureItem" object:nil ];
UIImagePickerController有一个delegate方法,拍照后调用了
-(void) imagePickerController:(UIImagePickerController *) picker didFinishPickingMediaWithInfo :(NSDictionary *)info
我使用图像选择器控制器呈现相机,图像拍摄后进入结束模式,所以我希望代表在相机完成拍照时调用。 就像通过 NSNotificationCenter 一样。
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate=self;
picker.allowsEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentViewController:picker animated:YES completion:NULL];
试试这个:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleNotification:) name:@"_UIImagePickerControllerUserDidCaptureItem" object:nil ];
UIImagePickerController有一个delegate方法,拍照后调用了
-(void) imagePickerController:(UIImagePickerController *) picker didFinishPickingMediaWithInfo :(NSDictionary *)info