+ 1
How do set you set colors with swift
Colors
2 Antworten
+ 1
Import UIKit
Let blackColor = UIColor.blackColor //swift v3. blackColor() for previous swift version
+ 1
If you want to set custom color, then
let myColor = UIColor(red: 75/255.0, green: 100/255.0, blue: 200/255.0, alpha: 1)
will become handy.
* 'alpha' value ranges between 0 & 1 setting the transparency level of the color.
* If red,green & blue values are set to 0, its the black color itself.