Skip to content

Instantly share code, notes, and snippets.

@wolffan
Created November 20, 2014 22:52
Show Gist options
  • Save wolffan/a49d8df45da9c8797610 to your computer and use it in GitHub Desktop.
Save wolffan/a49d8df45da9c8797610 to your computer and use it in GitHub Desktop.
Weak and strong for iOS blocks
//outside Block
__weak typeof(self) weakSelf = self;
//inside Block
__strong typeof(self) strongSelf = weakSelf;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment