Commit c7fbbfe8 by Daniel Dahan

working tap recognizers for focus and exposure

parent 7d520e79
...@@ -60,6 +60,9 @@ public class CapturePreviewView : MaterialView, UIGestureRecognizerDelegate { ...@@ -60,6 +60,9 @@ public class CapturePreviewView : MaterialView, UIGestureRecognizerDelegate {
didSet { didSet {
if tapToFocusEnabled { if tapToFocusEnabled {
prepareTapGesture(&tapToFocusGesture, numberOfTapsRequired: 1, selector: "handleTapToFocusGesture:") prepareTapGesture(&tapToFocusGesture, numberOfTapsRequired: 1, selector: "handleTapToFocusGesture:")
if let v: UITapGestureRecognizer = tapToExposeGesture {
tapToFocusGesture!.requireGestureRecognizerToFail(v)
}
} else { } else {
removeTapGesture(&tapToFocusGesture) removeTapGesture(&tapToFocusGesture)
} }
...@@ -73,6 +76,9 @@ public class CapturePreviewView : MaterialView, UIGestureRecognizerDelegate { ...@@ -73,6 +76,9 @@ public class CapturePreviewView : MaterialView, UIGestureRecognizerDelegate {
didSet { didSet {
if tapToExposeEnabled { if tapToExposeEnabled {
prepareTapGesture(&tapToExposeGesture, numberOfTapsRequired: 2, selector: "handleTapToExposeGesture:") prepareTapGesture(&tapToExposeGesture, numberOfTapsRequired: 2, selector: "handleTapToExposeGesture:")
if let v: UITapGestureRecognizer = tapToFocusGesture {
v.requireGestureRecognizerToFail(tapToExposeGesture!)
}
} else { } else {
removeTapGesture(&tapToExposeGesture) removeTapGesture(&tapToExposeGesture)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment