From 6747fb27ea6055e0ae530edec2bd0e6c1c97a6da Mon Sep 17 00:00:00 2001 From: Yury Popov Date: Thu, 14 May 2015 19:19:03 +0300 Subject: [PATCH] Sublayers cleanup refactoring --- pxSVG/pxSVGLayer.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pxSVG/pxSVGLayer.m b/pxSVG/pxSVGLayer.m index 69c28b2..1b463d3 100644 --- a/pxSVG/pxSVGLayer.m +++ b/pxSVG/pxSVGLayer.m @@ -164,7 +164,7 @@ - (void)clean if (self.loadOperation) {[self.loadOperation cancel];self.loadOperation = nil;} if (self.parseOperation) {[self.parseOperation cancel];self.parseOperation = nil;} if (self.layerOperation) {[self.layerOperation cancel];self.layerOperation = nil;} - while (self.sublayers.count) [self.sublayers.firstObject removeFromSuperlayer]; + for (CALayer *l in [self.sublayers copy]) [l removeFromSuperlayer]; self.contentRect = CGRectZero; } }