The difference between nsnotification and delegate is briefly described.:
1.EfficiencyIt must be that the delegate is higher than nsnotification.
2. The delegate method is more direct than notification. The most typical feature is that,The delegate method usually needs to focus on the returned values.That is, the result of the delegate method. For example,-windowshouldclose: whether yes or no is returned. Therefore, the delegate method usually contains the word "shocould", which is a very expressive word. That is, if you do my delegate, I will ask you if you want to close the window? You need to give me an answer. I will decide how to proceed based on your answer. On the contrary,The biggest characteristic of notification is that it does not care about the attitude of the recipient., I just release the announcement. If you accept it or not, it is your business. At the same time, I don't care about the result. Therefore, notification often uses the did term, such as nswindowdidresizenotification. After the nswindow object releases the notification, nothing will happen and it will not wait for the recipient's response.