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
UILabel
UITextField
userInteractionE
You can do this simply with a subclass of UILabel:
class Label : UILabel { override var text: String? { didSet { print("Text changed from \(oldValue) to \(text)") } } }
oldValue is a special value provided by Swift. See Property Observers
oldValue