Can someone explain the delegates in objective-c?

I have been using Objective-C for a while and pretty much understand most of its functions. However, the concept of delegates eludes me. Can someone please give a brief and easy understanding of what delegates are, how they are used in the iPhone SDK and how I can best use them in my own code?

Thank!

+3
source share
3 answers

There are several main reasons for using delegates in Objective-C, which are slightly different:

  • framework. , UITableView , ( , , ). , UITableView , -.

  • . , , , -, . , , , . , , , ( Objective-C, assign). , , .

. , NSURLConnection , , , .

+5

, , , . , , ( ).

, , UIViewController UITextView, . UIViewController UITextView. , ( , , ..), , , , , , , , .

C.

, :)

+3

, Lynda.com Tutorial: , , . , , , , . , .

, - . . , .

0

Source: https://habr.com/ru/post/1773464/


All Articles