Open vishw3 opened 9 years ago
for (CALayer *layer in self.view.layer.sublayers) { if ([layer isKindOfClass:[PulsingHaloLayer class]]) { [layer removeFromSuperlayer]; } }
This removes all layers that are of type PulsingHaloLayer.
thanks will try this ......
self.view.layer.sublayers = self.view.layer.sublayers?.filter { theLayer in !theLayer.isKind(of: PulsingHaloLayer.classForCoder()) }
This removes all layers that are of type PulsingHaloLayer.