Code Monkey home page Code Monkey logo

Comments (5)

bfeher avatar bfeher commented on July 18, 2024

Hi tskulbru!

When I started this project, the Polymer-Project Paper Elements were still in beta, and the designs were changing each week. Believe it or not, the ripple used to only cover a portion of the control, not the full control. I had taken screen captures since there was not official documentation on how much the ripple should cover and was estimating based on those captures.

I see now that the default behavior has changed, but don't worry, I already have a solution for you :)

CGFloat tapCircleDiameter 

The CGFloat value representing the Diameter of the tap-circle.
By default it will be the result of MAX(self.frame.width, self.frame.height).
tapCircleDiameterFull will calculate a circle that always fills the entire view.
Any value less than or equal to tapCircleDiameterFull will result in default being used.
The constants: tapCircleDiameterLarge, tapCircleDiameterMedium,
and tapCircleDiameterSmall are also available for use.

You can set this to any positive float value, but it seems that the value tapCircleDiameterFull is the one you want.

Try this and let me know if it is still not behaving properly:

myButton.tapCircleDiameter = tapCircleDiameterFull;

I will make some changes to the readme file to make this more obvious in the future. Sorry if it was hard to find.

Thanks for using BFPaperButton! :)

from bfpaperbutton.

tskulbru avatar tskulbru commented on July 18, 2024

Yes, i tested it with tapCircleDiameterFull, it fills the view which is better. But I don't think the animation is correct, it looks to me like it just fills the view and fades in from center. It doesn't look nor feel like the ripple animation on Android.

Other than than I'm very happy with the library, and i just hope that the library will be on par with the material design spec.

from bfpaperbutton.

bfeher avatar bfeher commented on July 18, 2024

Could you attach a gif of the issue? I don't quite understand what's happening. By default the circle should spawn from the tap location:

BOOL rippleFromTapLocation 

A flag to set to YES to have the tap-circle ripple from point of touch. If this is set to NO, the tap-circle will always ripple from the center of the view. Default is YES.

If you are referring to the background fade, then have you tried to set the property:

.backgroundFadeColor = [UIColor clearColor];

from bfpaperbutton.

tskulbru avatar tskulbru commented on July 18, 2024

Hehe, sorry for not being able to explain good enough. I'll see about giving you a gif (its a project for a client which i cant disclose a image for as of yet), but ill have to create a new project for it.

Thanks for the quick replies!

from bfpaperbutton.

bfeher avatar bfeher commented on July 18, 2024

No problem! I'm in Tokyo timezone so I might not always be this fast to respond, sorry.

from bfpaperbutton.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.