Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

once added as sublayer how to remove it from layer #19

Open
vishw3 opened this issue Apr 24, 2015 · 3 comments
Open

once added as sublayer how to remove it from layer #19

vishw3 opened this issue Apr 24, 2015 · 3 comments

Comments

@vishw3
Copy link

vishw3 commented Apr 24, 2015

No description provided.

@JustinDMoore
Copy link

        for (CALayer *layer in self.view.layer.sublayers) {
            if ([layer isKindOfClass:[PulsingHaloLayer class]]) {
                [layer removeFromSuperlayer];
            }
        }

This removes all layers that are of type PulsingHaloLayer.

@vishw3
Copy link
Author

vishw3 commented May 12, 2015

thanks will try this ......

@elgawady14
Copy link

    self.view.layer.sublayers = self.view.layer.sublayers?.filter { theLayer in
        !theLayer.isKind(of: PulsingHaloLayer.classForCoder())
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants