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
Implement IFTTTMaskEffectRevealFromCenter animation in IFTTTMaskAnimation #1701
Conversation
@jsm174 Seems great. I like it. |
@ashavit Thank you. I just attempted a quick merge of this into your class. Could you give me some thoughts on this:
|
@jsm174 What if you do something more like this, to make the names of the enum in the existing mask class make more sense as a general mask (since the circle isn't really "swiping" in the same way).
|
This looks like it will be a great addition! |
8e9ef89
to
595bd08
Compare
with maskEffect. Added new animation for IFTTTMaskEffectRevealFromCenter
@lauraskelton Great suggestions. Implemented your changes in this pull request. (Tested as well too in my own app). |
@jsm174 This is looking really great! I tested it out, and noticed that when the view it's masking is not square, it behaves in a way I don't totally expect, masking the view out to a part-rectangle with a circle on the narrow end. I can imagine 2 desirable uses for this circle mask animation - one is when you want to reveal a view up until it's a circle inset in the view's bounds. The final 100% visible state would look like this: Another is when you want to reveal the view fully, so that in the end it's showing its full rectangular bounds, like this: I think we need to do something more like this to differentiate between the two cases-
How does that sound? |
IFTTTEffectRevealFromCenterToCircle. Added IFTTTMaskEffectRevealFromCenterToBounds mask effect as per @lauraskelton
@lauraskelton great! Implemented your code in last commit! |
@jsm174 awesome, merging it in! |
Implement IFTTTMaskEffectRevealFromCenter animation in IFTTTMaskAnimation
Not sure if anyone else would find this useful, but I implemented a circular mask animation. This animation will mask a view to a circle starting in the center at visibility 0 and work it's way to the outside at visibility 1.0.
Initially I thought I could use the corner radius animation for what I needed, but I wanted the radius to be calculated automatically.