Why do I have to call my protocol functions two times to make it work?
I’m currently building a simple app to learn the protocol – delegate functionality. However my code doesn’t work, even after I edited the way I did in my first practice app where it worked. In the FirstViewController
there is a UILabel
and a UIButton
. When the user taps on the UIButton
, a segue brings them to the SecondViewController
where they should enter their name into a UITextField
. After that, they can press the UIButton
in the SecondViewController
and the entered Name should be displayed in the UILabel
in the FirstViewController
.