简体   繁体   English

在iphone的cameraoverlayview中使用自定义按钮捕获图像

[英]Capturing image using custom buttons in cameraoverlayview in iphone

Thanks in advance.提前致谢。

I have created a custom toolbar on cameraOverlayView .我在cameraOverlayView创建了一个自定义工具栏。 One of the toolbar buttons will trigger the takeSnap method –工具栏按钮之一将触发takeSnap方法 –

-(IBAction)takeSnap
{
    NSLog(@"take snap called");
    [self.picker takePicture];  



- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)img editingInfo:(NSDictionary *)editingInfo
{
    UIImage *image = img;
    NSLog(@"image : %@",image);
}
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
{
    NSLog(@"Did cancel called");  
}

But it is not calling the delegate methods after capturing.但它不是在捕获后调用委托方法。 The view continues to remain in capture mode.视图继续保持在捕获模式。 If any one know the reason please help me.如果有人知道原因,请帮助我。

Its very likely that you haven't assigned a delegate properly.您很可能没有正确分配代表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM