Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions LLSimpleCamera/LLSimpleCamera.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,11 @@ typedef enum : NSUInteger {
*/
- (void)alterFocusBox:(CALayer *)layer animation:(CAAnimation *)animation;

/**
* Call this method in case you need to implement a custom tap to focus gesture
*/
- (void) focusViewWithGesture: (UITapGestureRecognizer *) gesture;

/**
* Checks is the front camera is available.
*/
Expand Down
8 changes: 8 additions & 0 deletions LLSimpleCamera/LLSimpleCamera.m
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,14 @@ - (void)showFocusBox:(CGPoint)point
}
}

- (void) focusViewWithGesture: (UITapGestureRecognizer *) gesture {
CGPoint touchedPoint = [gesture locationInView:self.view];

if (CGRectContainsPoint(self.view.frame, touchedPoint)) {
[self previewTapped:gesture];
}
}

#pragma mark - UIViewController

- (void)viewWillAppear:(BOOL)animated
Expand Down