Skip to content

Instantly share code, notes, and snippets.

@AndyDentFree
Created February 17, 2022 05:02
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 AndyDentFree/a4469bf8b167acf90f714565ee175bd3 to your computer and use it in GitHub Desktop.
Save AndyDentFree/a4469bf8b167acf90f714565ee175bd3 to your computer and use it in GitHub Desktop.
@IBAction public func onThicknesssliderChanged(_ sender: UISlider) {
let step: Float = 0.25 // using 0.1 causes text render backwards & slanted! Very weird SKLabel internal bug
let roundedValue = roundf(sender.value / step) * step
sender.value = roundedValue // force it to jump in increments
updatePreviewFromThicknessChange()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment