美文网首页
iOS weakify && strongify

iOS weakify && strongify

作者: 青椒辣不辣 | 来源:发表于2021-01-21 17:37 被阅读0次
#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

      本文链接:https://www.haomeiwen.com/subject/umslgktx.html