Is there a way to get notified when there is a change in a UILabel
\'s text or would I be better off using a UITextField
with userInteractionE
Create a class that inherits from UILabel. Such as:
class YourLabel: UILabel {
override var text: String? {
didSet {
if let text = text {
println("Text changed.")
} else {
println("Text not changed.")
}
}
}
}
Create a outlet of this class for your object.
@IBOutlet weak var label: YourLabel!
label.text = "abc"