Created
September 12, 2016 02:37
-
-
Save vinnybad/ccf23b9c43ee13b3f030d12fdea0dc78 to your computer and use it in GitHub Desktop.
This file contains 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
/* | |
* Strongify / Weakify shortcuts | |
* | |
* These declare and instantiate weak and strong variables | |
* statically so it's easier to write. It's a nice middle-ground | |
* when compared to other solutions in the wild. | |
* | |
*/ | |
#define WEAKIFY(aSelf) __weak typeof(aSelf) weakSelf = aSelf; | |
#define STRONGIFY(aSelf) __strong typeof(aSelf) strongSelf = aSelf; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment