edusperoni / nativescript-ripple

NativeScript plugin to add Android Material Design Ripple effect to your layouts.
Apache License 2.0
52 stars 13 forks source link

RippleColor property not working on iOS #8

Closed rhanb closed 7 years ago

rhanb commented 7 years ago

Hi @bradmartin ,

I'm using your plugin on both iOS and Android and it works fine. But only one thing doesn't work which is the RippleColor property for iOS. I tried to set it through hexadecimal ('#FFFFF') value or litteral value ("white"), it does work on Android. (The ripple effect works only the color applied doesn't)

Code sample:

<Ripple rippleColor="#c8c8c8" col="2" >
     <Label class="text-center" text="Service"></Label>
</Ripple>
registerElement("Ripple", () => require('nativescript-ripple').Ripple);

Thanks for your work 😄

rhanb commented 7 years ago

Oupsi,

Just checked the code of your plugin in the ripple.ios.ts , and the issue is not coming from the RippleColor property but from the backgroundColor of the view where the ripple if setted, on iOS you have to specify the backgroundColor on your element. I was doing it but only on the container so it wasn't working (well taking the default value).

:smile: