iOS浮動動作按鈕:ActionButton

jopen 9年前發布 | 29K 次閱讀 iOS開發 移動開發 ActionButton

ActionButton 是一個用 Swift 編寫的浮動動作按鈕,靈感來自 Google Inbox。

導入

You can use CocoaPods to integrate Action Button in your project. You can install it with the following command

$ gem install cocoapods

Update yourPodfileto use Action Button

pod 'ActionButton'

Then, run the following command

$ pod install

用法

Define your actions
let share = ActionButtonItem(title: "share", image: shareImage)
share.action = { item in println("Sharing...") }

let email = ActionButtonItem(title: "email", image: emailImage)
email.action = { item in println("Email...") }

Create a Action Button with your actions

actionButton = ActionButton(attachedToView: view, items: [share, email])
actionButton.action = { button in button.toggleMenu() }


iOS浮動動作按鈕:ActionButton

項目主頁:http://www.baiduhome.net/lib/view/home/1433901161161

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!