Listen to certain events of the control
Proxy mode is used to "decouple " The program directly
Tables can display very rich data, in order to achieve this effect, set the table " data source "
@required The methods that must be implemented
@optional Optional implementation method, and do not force implementation , if implemented can get special effect, if not implemented, also does not affect the normal operation of the program
ability to increase the flexibility of controls
Agent Stage Summary
1. comply with the agreement, pre-defined methods, not implemented, specific implementation of the agent responsible for the work
< control's name +datasource> defined data-related methods
The name of the < control +delegate> defines an event-related method that is typically used to listen for control events
2. proxy Methods
1> method names start with the name of the control ( without the class prefix ) , so you can quickly find the protocol method you need.
2> The first parameter is self--- means that in the protocol method, you can directly access the properties of an object, or call a method /c21>
3> The return value of the proxy method- controller sends data to the control (delegate)
Code block Storage Path
~/library/developer/xcode/userdata/codesnippets
Replace the contents of the folder with a new computer.
iOS Learning Note (2)