Ensure that the uncommon __unloadNode codepath does not unintentionally trigger node removal.

This commit is contained in:
Scott Goodson
2015-12-29 23:11:33 -08:00
parent 95e28d6c11
commit df3ce787f7
4 changed files with 31 additions and 3 deletions

View File

@@ -134,4 +134,18 @@
return _socialAppDataSource.count;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
PostNode *postNode = (PostNode *)[_tableView nodeForRowAtIndexPath:indexPath];
Post *post = _socialAppDataSource[indexPath.row];
BOOL shouldRasterize = postNode.shouldRasterizeDescendants;
shouldRasterize = !shouldRasterize;
postNode.shouldRasterizeDescendants = shouldRasterize;
NSLog(@"%@ rasterization for %@'s post: %@", shouldRasterize ? @"Enabling" : @"Disabling", post.name, postNode);
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
@end