iOS中block的详解weakSelf、strongSelf-转自唐巧
1
我们知道,在使用 block 的时候,为了避免产生循环引用,通常需要使用 weakSelf 与 strongSelf,写下面这样的代码:
__weak typeof(self) weakSelf = self;
[self doSomeBlockJob:^{
__strong typeof(weakSelf) strongSelf = weakSelf;
if (stro...
转载
2018-09-10 17:50:50 ·
550 阅读 ·
0 评论