0

enter image description here

For example I'm trying to make a tableViewController that has a color value for each row. According to the index, the color will be from bright to dark. I was mentioned that it can be done in a few lines of code, but I'm confused how to do it.

Answers will be highly appreciated.

john3161
  • 25
  • 4
  • possible duplicate of [Objective-c : How to create different shades of a color](http://stackoverflow.com/questions/25260727/objective-c-how-to-create-different-shades-of-a-color) – Fogmeister Aug 26 '14 at 10:00
  • 1
    This question is almost identical. The same code can be used here too. The change is instead of using a for loop to vary the colour you just need to use the index (and the number of rows). – Fogmeister Aug 26 '14 at 10:01
  • if () { cell!.colorImage.backgroundColor = UIColor(hue: 0.4, saturation: 0.4, brightness: 0.9, alpha: 1.0) } – john3161 Aug 29 '14 at 05:38
  • Not so sure how to have it change in value. – john3161 Aug 29 '14 at 05:39

0 Answers0