how do I change text in a label with swift?

The Solution to how do I change text in a label with swift? is


Swift uses the same cocoa-touch API. You can call all the same methods, but they will use Swift's syntax. In this example you can do something like this:

self.simpleLabel.text = "message"

Note the setText method isn't available. Setting the label's text with = will automatically call the setter in swift.

~ Answered on 2014-06-18 01:19:41


Most Viewed Questions: