I\'ve searched everywhere and can\'t seem to find a clear answer on updating a label in real-time.
How do i go about updating a UILabel
(real-time) with
option 1: Directly you can make action of textfield with value changed
@IBAction func textFieldValueChange(_ sender: UITextField) {
self.label.text = sender.text
}
option 2: Give Delegate to TextField
func textField(textField: UITextField, shouldChangeCharactersInRange range: NSRange, replacementString string: String) -> Bool {
label.text = textField.text
return true
}