Skip to content

Instantly share code, notes, and snippets.

@barisuyar
Created December 1, 2021 19:13
Show Gist options
  • Save barisuyar/6d09b047813ce8134d2f072e8cf3992c to your computer and use it in GitHub Desktop.
Save barisuyar/6d09b047813ce8134d2f072e8cf3992c to your computer and use it in GitHub Desktop.
Slider + create thumb
// 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)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment