我使用图像选择器控制器来呈现相机,拍摄完图像后,它进入结束模式,所以我希望代表在相机完成拍摄时调用。 就像通过NSNotificationCenter一样。
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate=self;
picker.allowsEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentViewController:picker animated:YES completion:NULL];
答案 0 :(得分:1)
试试这个:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleNotification:) name:@"_UIImagePickerControllerUserDidCaptureItem" object:nil ];
答案 1 :(得分:0)
在拍照后调用了UIImagePickerController .it的委托方法。
-(void) imagePickerController:(UIImagePickerController *) picker didFinishPickingMediaWithInfo :(NSDictionary *)info