[翻譯] LiquidFloatingActionButton

LiquidFloatingActionButtonhtml

 

https://github.com/yoavlt/LiquidFloatingActionButtongit

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.github

LiquidFloatingActionButton是一個具備液體效果的浮動按鈕組件,符合 material design 設計規範,靈感來自於 Material In a Liquid State 。你也能夠將其用做加載信息。swift

Featuresruby

  •  liquid animation 液體流動動畫效果
  •  easily custoizable 方便定製
  •  Objective-C compatible 兼容OC
  •  Swift2.0 支持Swift2.0

You can play a demo with appetize.ioapp

你能夠嘗試一下demoiphone

 

Usagepost

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

你只須要實現 LiquidFloatingActionButtonDataSource 以及 LiquidFloatingActionButtonDelegate 便可。ui

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.

相關文章
相關標籤/搜索