Made an app with two labels in IB and the following:
@IBOutlet var label1: UILabel!
@IBOutlet var label2: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
label1.textColor = UIColor.redColor() // in Swift 3 it's UIColor.red
label2.textColor = label1.textColor
}
label2 color changed as expected, so your line works. Try println(otherLabel.textColor) right before you set myLabel.textColor to see if the color's what you expect.
The easiest workaround is create dummy labels in IB, give them the text the color you like and set to hidden.
You can then reference this color in your code to set your label to the desired color.
yourLabel.textColor = hiddenLabel.textColor
The only way I could change the text color programmatically was by using the standard colors, UIColor.white, UIColor.green...
The text field placeholder and the "is really" label is hard to see at night. So i change their color depending one what time of day it is.
Also make sure you connect the new IBOutlet isReallyLabel. To do so open Main.storybaord and control-drag from "Convert" view controller to the "is really" text field and select the isReallyLabel under Outlets.
WARNING: I have not tested to see if the application is open while the time of day swaps.