-
-
Notifications
You must be signed in to change notification settings - Fork 565
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
Custom layer masks conflict with internal MarqueeLabel masking #214
Comments
That's pretty weird, because line 1153 is where MarqueeLabel just returns the mask of the base view layer, and the only place the mask layer is set is at line 1029…where it is set as a CAGradientLayer. Does your project code mask the MarqueeLabel in any way, by setting the |
Spot on! Yes I do for custom border rounding.
That is exactly how i have it at the moment |
So yep that's the reason, your CAShapeLayer is replacing the CAGradientLayer that MarqueeLabel assigns to itself to handle the fading at the left and right edges. There's probably a way for MarqueeLabel to mask itself without using the top layer mask so that it doesn't conflict, but I'll have to look into it. I think the quick and easy way for you to fix it right now would be to just put your MarqueeLabel instance inside a wrapper UIView and then mask that wrapper view. |
Yea that's exactly what i did as a work around =) |
Usage Details
Steps to Reproduce the Problem
5 error on line 1153 - Could not cast value of type 'CAShapeLayer' (0x111186cc0) to 'CAGradientLayer' (0x111187260) from MarqueeLabel.swift
Is there something that I have missed or have done wrong??
Any help is much appreciated :)
The text was updated successfully, but these errors were encountered: