While following a tutorial, I prejudged the next step of the tutorial and decided to try it on my own. The objective is to connect an IBAction function to a touch event so that once we begin editing a UITextField then it will update a UILabel. I jumped ahead of the tutorial that suggests connecting to the 'Editing Changed' option in the connections inspector, but I unknowingly made a connection to the 'Editing Did Begin' because it made sense verbally.
I ran the application and my UILabel wasn't updating. Therefore I re-read the tutorial slowly and noticed that I needed to use the 'Editing Changed' touch event instead. I wanted to understand why it didn't work initially so after checking Apple's reference material on UIControlEvents, I noticed that it uses the terms 'editing session'. Can anyone explain what a session is?
Hopefully this way I'll understand why my process didn't work on the first try.
class ConversionViewController: UIViewController {
@IBOutlet var celsiusLabel: UILabel!
@IBAction func fahrenheitFieldEditingChanged(textField: UITextField){
celsiusLabel.text = textField.text
}
}
Thank you in advance