LiquidFloatingActionButton icon indicating copy to clipboard operation
LiquidFloatingActionButton copied to clipboard

How to wire events to the button itself, not the child buttons

Open apryiomka opened this issue 10 years ago • 10 comments

The current button behavior is to show the child buttons/cells. But i need just the button, without cells. How can I wire an event or delegate to the button click / select, not the cells.

Thanks, Alex.

apryiomka avatar Dec 28 '15 21:12 apryiomka

Hi Alex,

I have added didTapped and didLongTapped methods to the delegate. If you want to wire behaviour to the LFAB you should be able to add didTapped method to the delegate. This is still only a pull request so if you want to use it now you can grab it from the pull request section or from my fork.

deathslocus avatar Jan 15 '16 01:01 deathslocus

Hi, I have the same issue. I found that the method didTapped is private. Could you explain me how can I listen the click event?

Thank you!

yamila-fraiman avatar Jan 15 '16 21:01 yamila-fraiman

To get this to work you need to add the code from either my fork or from the pull request. To listen to the didTapped func you need to add didTapped to your LFAB delegate

deathslocus avatar Jan 16 '16 01:01 deathslocus

Thank you! Is the swift-2.0 branch updated with this feature? I downloaded that branch and didn't find the update but I removed the specific branch from my pod file and I can see it now.

yamila-fraiman avatar Jan 16 '16 02:01 yamila-fraiman

It is currently just a Pull Request (#35)

deathslocus avatar Jan 16 '16 06:01 deathslocus

Perfect. I noticed that it isn't merged the commit that allows changing the plus sign with a custom image.

yamila-fraiman avatar Jan 16 '16 13:01 yamila-fraiman

Hi im new in coding. How do i perform the action in my viewcontoller to at func when the action button are tapped ? :-)

ghost avatar Feb 05 '16 07:02 ghost

You need to add the function into the delegate which will be different depending on how your project is setup. Then call whatever function in the delegate call. If you're still having issues ill ad you on skype or something and help you through it.

deathslocus avatar Feb 13 '16 04:02 deathslocus

Hi,

Is there any way around to do this without having to use code from this pull request?

lcbasu avatar Apr 02 '16 10:04 lcbasu

I guess so, just write the functionality yourself. It's a very small change

deathslocus avatar Apr 16 '16 04:04 deathslocus