Fix an issue that could cause the view / layer to be created early by -clearContents.

This commit is contained in:
Scott Goodson
2015-11-19 17:10:06 -08:00
parent 59d52ced3f
commit 18dffb41e8
2 changed files with 2 additions and 17 deletions

View File

@@ -1644,7 +1644,8 @@ void recursivelyEnsureDisplayForLayer(CALayer *layer)
- (void)clearContents
{
self.layer.contents = nil;
// No-op if these haven't been created yet, as that guarantees they don't have contents that needs to be released.
_layer.contents = nil;
_placeholderLayer.contents = nil;
_placeholderImage = nil;
}