self持有了tableView,tableView持有了cell,cell中的一个block持有了self,然后就循环引用了。
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
KKBVideoClipsCell *cell = [tableView dequeueReusableCellWithIdentifier:KKBVideoClipsCell.className forIndexPath:indexPath];
cell.itemModel = self.dataList[indexPath.row];
@weakify(self);
cell.didClickSlogan = ^(NSString *url) {
@strongify(self);
KKBVideoClipsWebController *webController = [[KKBVideoClipsWebController alloc] init];
webController.url = url;
webController.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:webController animated:YES completion:nil];
};
return cell;
}