Created
July 4, 2020 06:13
-
-
Save akio0911/747c5cc9abfbcdfceca80831526d8540 to your computer and use it in GitHub Desktop.
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
| func makeColor(row: Int, count: Int) -> UIColor { | |
| switch row { | |
| case 0: | |
| return count > 0 ? UIColor.gray : UIColor.clear | |
| case 1: | |
| return count > 60 ? UIColor.gray : UIColor.clear | |
| case 2: | |
| return count > 300 ? UIColor.gray : UIColor.clear | |
| case 3: | |
| return count > 600 ? UIColor.gray : UIColor.clear | |
| case 4: | |
| return count > 1200 ? UIColor.gray : UIColor.clear | |
| case 5: | |
| return count > 3000 ? UIColor.gray : UIColor.clear | |
| case 6: | |
| return count > 6000 ? UIColor.gray : UIColor.clear | |
| case 7: | |
| return count > 9000 ? UIColor.gray : UIColor.clear | |
| case 8: | |
| return count > 12000 ? UIColor.gray : UIColor.clear | |
| default: | |
| return UIColor.clear | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment