Skip to content

Instantly share code, notes, and snippets.

@digitallysavvy
Created November 27, 2019 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save digitallysavvy/644f2a906fb338d3566d673e631b42e0 to your computer and use it in GitHub Desktop.
Save digitallysavvy/644f2a906fb338d3566d673e631b42e0 to your computer and use it in GitHub Desktop.
Snippet for touchesBegan within the ARSupportAudienceViewController
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