Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Purpose of fadeLayer ? #12

Closed
namanhams opened this issue Mar 12, 2014 · 5 comments
Closed

Purpose of fadeLayer ? #12

namanhams opened this issue Mar 12, 2014 · 5 comments

Comments

@namanhams
Copy link

I removed fadeLayer property of FBShimmeringMaskLayer, and commented out all the code related to this property. Everything still works fine. So my questions :

  1. What's the purpose of fadeLayer ?
  2. Since FBShimmeringMaskLayer is used as a mask layer, only alpha channel will be used. And fadeLayer is a sublayer of it, how does it affect anything here ? I tried to change the background colour of fadeLayer to various colours with various alpha values, but it doesn't have any effect.
@grp
Copy link
Contributor

grp commented Mar 12, 2014

If you look at the .gif in the README, the fadeLayer implements the fade-in effect after the shimmering stops, timed to match the beat of the shimmer. If you take it out, it will just snap back to full opacity when the shimmering finishes.

@namanhams
Copy link
Author

Thanks @grpaul , i agree. But seems that changing the shimmeringBeginFadeDuration or shimmeringEndFadeDuration doesn't have any effect on the fading animation. Do you know why ?

@grp
Copy link
Contributor

grp commented Mar 12, 2014

Thanks for catching it! Looks like the fade out duration wasn't being respected. 0959467 should fix that.

@grp grp closed this as completed Mar 12, 2014
@namanhams
Copy link
Author

@grpaul : I think you forgot to set the animation duration.

grp added a commit that referenced this issue Mar 12, 2014
 - Always apply shimmering width.
 - Update default shimmering width.
 - Set duration properly for fade. (#12)
@grp
Copy link
Contributor

grp commented Mar 12, 2014

Oops. Fixed in 80174f9 (along with a minor issue applying the shimmering width).

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

No branches or pull requests

2 participants