美文网首页
iOS中的block代码块中self

iOS中的block代码块中self

作者: 凌空飞翔 | 来源:发表于2016-01-19 14:02 被阅读195次

```

__weak typeof(self) weakSelf = self;

self.bootomShoppingCartsVC.popVC = ^(BOOL pop)

{

typeof(weakSelf) __strong strongSelf = weakSelf;

if (pop)

{

UIViewController *viewCtl = strongSelf.navigationController.viewControllers[2];

[strongSelf.navigationController popToViewController:viewCtl animated:YES];;

}

};

```

相关文章

网友评论

      本文标题:iOS中的block代码块中self

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