I have a UILabel which is part of a [UILabel] array, I am trying to set the text of the UILabel in the following way:
yLabel[0].text = "\(yMaxValue)"
But the result is always 0.0. When I run
println(yLabel[0].text)
The result is Optional("0.0")
. Is this because the UILabel is part of an array? How can I set the text of a UILabel that is part of an array?
EDIT: Screenshot of the issue, the output from println(test.text) is Optional("0.0")
yLabels are created in this line:
private var yLabels: [UILabel] = [UILabel](count: 5, repeatedValue: UILabel())