I have created two button cells in LiduidFloatingActionButton with following code.
private func createFloatingButtons(){
    cells.append(createButtonCell("firstCell"))
    cells.append(createButtonCell("secondCell"))
    let floatingFrame = CGRect(x: self.view.frame.width - 56 - 16, y: self.view.frame.height - 56 - 36, width: 56, height: 56)
    let floatingButton = createButton(floatingFrame, style:.Up)
    self.view.addSubview(floatingButton)
    self.floatingActionButton = floatingButton
}
I don't know to add action in each cell of LiquidFloatingActionButton and also to display the name of cell. Please help me if anybody known about it.
I got the solution for adding action on each cell.
extension CampaignListViewController: LiquidFloatingActionButtonDelegate {
func liquidFloatingActionButton(liquidFloatingActionButton: LiquidFloatingActionButton, didSelectItemAtIndex index: Int){
   // floatingActionButton.didTappedCell()
    switch(index){
    case 0:
        // do something
        break;
    case 1:
        // do somthing
        break;
    default:
        break;
    }
    self.floatingActionButton.close()
}
                        Call this function in viewDidLoad(). Read this GitHub code you will get more idea. https://github.com/yoavlt/LiquidFloatingActionButton/blob/master/Example/LiquidFloatingActionButton/ViewController.swift
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With