How to initialize UIColor from RGB values properly?

后端 未结 6 2322
春和景丽
春和景丽 2020-12-23 18:47

I am working on an iPhone application which uses various colors. When user selects the particular color button I set drawing color accordingly. I am getting the color for so

6条回答
  •  -上瘾入骨i
    2020-12-23 19:39

    In Swift you can easily set your Background-Color for example of a cell like this:

    cell.backgroundColor = UIColor.init(red: 14.0/255.0, green: 114.0/255.0, blue: 199.0/255.0, alpha: 1)

    :-)

提交回复
热议问题