我在LiduidFloatingActionButton中创建了两个按钮单元,代码如下.
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
}
Run Code Online (Sandbox Code Playgroud)
我不知道在LiquidFloatingActionButton的每个单元格中添加动作,还要显示单元格的名称.如果有人知道,请帮助我.
我得到了在每个单元格上添加操作的解决方案。
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()
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
79 次 |
| 最近记录: |