[翻译] LiquidFloatingActionButton

LiquidFloatingActionButton是一个实现液体动画效果的Material Design浮动按钮组件,支持Objective-C和Swift,易于定制,可通过CocoaPods安装。它提供了一个简单的API,允许开发者通过实现DataSource和Delegate来配置按钮的行为。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

LiquidFloatingActionButton

 

https://github.com/yoavlt/LiquidFloatingActionButton

LiquidFloatingActionButton is floating action button component of material design in liquid state, inspired by Material In a Liquid State. This is also spinner loader components in liquid state.

LiquidFloatingActionButton是一个具有液体效果的浮动按钮组件,符合 material design 设计规范,灵感来自于 Material In a Liquid State 。你也可以将其用作加载信息。

Features

  •  liquid animation 液体流动动画效果
  •  easily custoizable 方便定制
  •  Objective-C compatible 兼容OC
  •  Swift2.0 支持Swift2.0

You can play a demo with appetize.io

你可以尝试一下demo

 

Usage

You just need implement LiquidFloatingActionButtonDataSource and LiquidFloatingActionButtonDelegate similar to well-known UIKit design.

你只需要实现 LiquidFloatingActionButtonDataSource 以及 LiquidFloatingActionButtonDelegate 即可。

let floatingActionButton = LiquidFloatingActionButton(frame: floatingFrame)
floatingActionButton.dataSource = self
floatingActionButton.delegate = self

 

LiquidFloatingActionButtonDataSource

  • func numberOfCells(liquidFloatingActionButton: LiquidFloatingActionButton) -> Int
  • func cellForIndex(index: Int) -> LiquidFloatingCell

 

LiquidFloatingActionButtonDelegate

  • optional func liquidFloatingActionButton(liquidFloatingActionButton: LiquidFloatingActionButton, didSelectItemAtIndex index: Int)

 

Easily customizable

 

Installation

LiquidFloatingActionButton is available through CocoaPods. To install it, simply add the following line to your Podfile:

你可以通过 CocoaPods 安装 LiquidFloatingActionButton。在Podfile中写入下面一句话即可:

pod "LiquidFloatingActionButton"

or, if you use Carthage, add the following line to your Carthage file.

或者,如果你在用 Carthage ,你在 Carthage 文件中写入一下一句话:

github "yoavlt/LiquidFloatingActionButton"

Please use swift-2.0 branch if you adopt latest Xcode.

如果想在最新的 Xcode 上使用,请用 swift-2.0。

 

License

LiquidFloatingActionButton is available under the MIT license. See the LICENSE file for more info.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值