下面的代码为什么能避免强引用循环?
cell.thumbnailView.image = item.thumbnail;
__weak BNRItemCell *weakCell = cell;
cell.actionBlock = ^{
NSLog(@"Going to show image for %@", item);
BNRItemCell *strongCell = weakCell;
if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) {
NSString *itemKey = item.itemKey;
// If there is no image, we don't need to display anything
UIImage *img = [[BNRImageStore sharedStore] imageForKey:itemKey];
if (!img) {
return; }
// Make a rectangle for the frame of the thumbnail relative to
// our table view
CGRect rect = [self.view convertRect:strongCell.thumbnailView.bounds
fromView:strongCell.thumbnailView];