Created
December 3, 2019 18:58
-
-
Save digitallysavvy/7b3a0639e1361d13f76b6b85cddfa79c to your computer and use it in GitHub Desktop.
Snippet for clearSubLayers 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
func clearSubLayers() { | |
DispatchQueue.main.async { | |
// loop through layers drawn from touches and remove them from the view | |
guard let sublayers = self.drawingView.layer.sublayers else { return } | |
for layer in sublayers { | |
layer.isHidden = true | |
layer.removeFromSuperlayer() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment