iOS weakify && strongify

#define rj_weakify(var) __weak typeof(var) RJWeak_##var = var;

#define rj_strongify(var) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wshadow\"") \
__strong typeof(var) var = RJWeak_##var; \
_Pragma("clang diagnostic pop")

你可能感兴趣的:(iOS weakify && strongify)