I am confused on whether I can change the color of a button by a label. The label will determine what color the button will be from using a random color generator in code.
Call myButton.setTitleColor(UIColor.blue, forState: .Normal) each time you want to change the color.
You could put it in the didSet of the label.
To generate random color, define colore with RGB : compute 3 random numbers betwwen 0...255: redRandom, greenRandom, blueRandom
and call
setTitleColor(UIColor(red: redRandom/255.0, green: greenRandom/255.0, blue: blueRandom255.0), forState: UIControlState.Normal)