在block中使用self

__weak typeof(self) weakSelf = self;

[self doABlockOperation:^{

    __strong typeof(weakSelf) strongSelf = weakSelf;

    if(strongSelf) {

        ...

    }

}];

原文地址:https://www.cnblogs.com/weiboyuan/p/4974410.html