84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
错误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]; }];
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
你把self转换一下加上block字段之后就不会被retain了
__block ViewController *controller = self; [_tableView setPullToRefreshHandler:^{ [controller dataDidRefresh:nil]; }];
在ARC下不用__block 而是用 __weak 为了避免出现循环引用
你把self转换一下加上block字段之后就不会被retain了
__block ViewController *controller = self;
[_tableView setPullToRefreshHandler:^{
[controller dataDidRefresh:nil];
}];
在ARC下不用__block 而是用 __weak 为了避免出现循环引用