Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private func layoutFillColor() {
- if level >= 0 && level <= 100 {
- switch level {
- case 0...lowThreshold:
- levelFill.backgroundColor = lowLevelColor.cgColor
- case lowThreshold...mediumThreshold:
- levelFill.backgroundColor = mediumLevelColor.cgColor
- case mediumThreshold...100:
- levelFill.backgroundColor = highLevelColor.cgColor
- default: break
- }
- terminalOpening.backgroundColor = (backgroundColor ?? .white).cgColorß
- } else {
- levelFill.backgroundColor = noLevelColor.cgColor
- terminalOpening.backgroundColor = noLevelColor.cgColor
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement