0
可能重复:
What is the difference between Notifications, Delegates, and Protocols?协议及委托
我在目标C新。想用几句话来理解Protocols
和Delegates
的概念。就像在什么情况下我应该考虑声明一个Protocol
,然后在我的类中作为委托使用它或让其他类使用它。
而不是Protocols
为什么我不能让我的班级做同样的工作?
感谢您的时间。
[通知,委托和协议之间有什么区别?](http://stackoverflow.com/questions/7118598/)可能的副本[代表和协议之间的区别](http://stackoverflow.com/questions/5431413 /在协议和委托之间的区别)也[委托与协议](http://stackoverflow.com/questions/6361958/delegate-vs-protocol) –