Last active
August 29, 2015 14:17
-
-
Save 98chimp/8082ece9c41c8c70ef27 to your computer and use it in GitHub Desktop.
Week02 - D04 Questions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Q1.A. | |
Q1.B. i) Any number of objects may receive the notification, not just the delegate object. This precludes returning a value. | |
ii) An object may receive any message you like from the notification center, not just the predefined delegate methods. | |
iii) The object posting the notification does not even have to know the observer exists. | |
Q1.C. | |
Q2. This code will maintain a strong reference to self which leads to a strong reference cycle and poor memory management. To avoid this problem, the code can be modified as follows: | |
[self setMySexyBlock:^{ [__weak self mySexyMethod]; }]; | |
Q3. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment