Created
November 27, 2019 19:55
-
-
Save digitallysavvy/644f2a906fb338d3566d673e631b42e0 to your computer and use it in GitHub Desktop.
Snippet for touchesBegan within the ARSupportAudienceViewController
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { | |
// get the initial touch event | |
if self.sessionIsActive, let touch = touches.first { | |
let position = touch.location(in: self.view) | |
self.touchStart = position | |
self.touchPoints = [] | |
if debug { | |
print(position) | |
} | |
} | |
// check if the color selection menu is visible | |
if let colorSelectionBtn = self.colorSelectionBtn, colorSelectionBtn.alpha < 1 { | |
toggleColorSelection() // make sure to hide the color menu | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment