got the answer plz refer to WWDC 2010 videos (421 part in side Incorporating the Camera and Photo Library in your App)
How to take picture by touch on the screen/camera live feed using UIImageview In iOS
-
30-07-2022 - |
Pergunta
I am writing a camera application in iOS using phonegap/cordova
I am overlaying image using camera overlay function in camera live feed. The code is below.
UIImageView *overlay=[[UIImageView alloc]initiwithImage[UIImage imageNamed:@"camera.jpg"]];
Picker.overlay=overlay;
pickerController.overlay=overlay;
How to take a picture if I touch or click or tap on screen/ camera Live feed in iOS programatically using UITapGestureRecognizer
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]
initWithTarget:self action:@selector(ClickEventOnImage:)];
[tap setNumberOfTouchesRequired:2];
[tap setDelegate:self];
//Don't forget to set the userInteractionEnabled to YES, by default It's NO.
overlay.userInteractionEnabled = YES;
[overlay addGestureRecognizer:tap];
-(void)ClickEventOnImage:(id)sender
{
NSlog(@"tapRegonise");
}
I am able to see output in my console as tapRegoniser. but instead i want to take a picture on that tap
For example how camera works in Nokia Lumia Phone's by pressing any where on screen it click a picture.
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow