Created
December 1, 2021 19:20
-
-
Save barisuyar/9f8c1923c048d7adafee0302d84c4b58 to your computer and use it in GitHub Desktop.
Slider+all thumb states
This file contains hidden or 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
| // 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