错误ID
ListViewController.m:135:10: Capturing 'self' strongly in this block is likely to lead to a retain cycle
开了ARC
[_tableView setPullToRefreshHandler:^{ [self dataDidRefresh:nil]; }];
错误ID
ListViewController.m:135:10: Capturing 'self' strongly in this block is likely to lead to a retain cycle
开了ARC
[_tableView setPullToRefreshHandler:^{ [self dataDidRefresh:nil]; }];
4 回答3.7k 阅读
2 回答1.7k 阅读✓ 已解决
1 回答1.1k 阅读✓ 已解决
2 回答1.2k 阅读
1 回答1.1k 阅读
1 回答1k 阅读
894 阅读
你把self转换一下加上block字段之后就不会被retain了
__block ViewController *controller = self;
[_tableView setPullToRefreshHandler:^{
[controller dataDidRefresh:nil];
}];