Skip to content

Instantly share code, notes, and snippets.

@barisuyar
Created December 1, 2021 19:20
Show Gist options
  • Select an option

  • Save barisuyar/9f8c1923c048d7adafee0302d84c4b58 to your computer and use it in GitHub Desktop.

Select an option

Save barisuyar/9f8c1923c048d7adafee0302d84c4b58 to your computer and use it in GitHub Desktop.
Slider+all thumb states
// Step 5
private func createThumbImageView() {
let thumbSize = (3 * frame.height) / 4
let thumbView = ThumbView(frame: .init(x: 0,
y: 0,
width: thumbSize,
height: thumbSize))
thumbView.layer.cornerRadius = thumbSize / 2
let thumbSnapshot = thumbView.snapshot
setThumbImage(thumbSnapshot, for: .normal)
setThumbImage(thumbSnapshot, for: .highlighted)
setThumbImage(thumbSnapshot, for: .application)
setThumbImage(thumbSnapshot, for: .disabled)
setThumbImage(thumbSnapshot, for: .focused)
setThumbImage(thumbSnapshot, for: .reserved)
setThumbImage(thumbSnapshot, for: .selected)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment