+ 2
why we set delegate to self always, what does delegate do
4 Answers
+ 2
A delegate is an object that promise he can get the job done on behalf of another object.
There is a contract between the two objects to handle the job:
Optional methods and required methods to implement.
when you say textField.delegate = self.
That means that the instance where the statement is coded says: "yes I am going to be able to get the job done for you, tell me your requirements and optional methods to complete the tasks needed.
I see this like that, hope it helps.
Enjoy
+ 1
Try the following alternative explanation. I got my understanding about delegate from this: http://stackoverflow.com/questions/24099230/delegates-in-swift/33549729#33549729
0
Still can't understand, I'd already read this
0
Yeah that helped me, Thanks