LiquidFloatingActionButton icon indicating copy to clipboard operation
LiquidFloatingActionButton copied to clipboard

creating two buttons produces animation errors

Open galileomd opened this issue 9 years ago • 0 comments

anyone know how to properly create two buttons and not have animation errors when one is tapped, then the other one is tapped?

am i creating them incorrectly?

` func createButtons() { let createButton: (CGRect, LiquidFloatingActionButtonAnimateStyle) -> LiquidFloatingActionButton = { (frame, style) in let floatingActionButton = LiquidFloatingActionButton(frame: frame) floatingActionButton.animateStyle = style floatingActionButton.color = UIColor.whiteColor() floatingActionButton.dataSource = self floatingActionButton.delegate = self return floatingActionButton }

    for var i=1; i<5; i++
    {
        let buttonFrame =  CGRect(x: 0, y: i*50, width: 64, height: 64)
        let button = createButton(buttonFrame, .Right)
        self.view.addSubview(button) 
    }

    let cellFactory: (String) -> LiquidFloatingCell = { (iconName) in
        return LiquidFloatingCell(icon: UIImage(named: iconName)!)
    }

    cells.append(cellFactory("pencil2"))  //edit
    cells.append(cellFactory("pencil2"))  //edit
    cells.append(cellFactory("trash"))  // edit
}`

galileomd avatar Feb 29 '16 17:02 galileomd