文章来源:淘论文网   发布者: 毕业设计   浏览量: 29



还可以点击去查询以下关键词:
[Swift]    [KYFloatingActionButton]    [【Swift】KYFloatingActionButton]   

项目介绍:

KYFloatingActionButton

https://github.com/Lawlietop/KYFloatingActionButton

That's a FloatingActionButton and you can set its position with autolayout
一个弹出菜单按钮,可以自定义弹出的按钮的位置。

Requirements 编译环境

iOS 8.0+

Swift 3

Xcode 8+

Demo

Usage 使用步骤Step 1

Drag a UIView into storyboard or xib

拖动一个UIView进入 storyboard 或者 xib

Step 2

Give it constraint without width and height because it has a fixed width and height 55 ,Recommend adjusting height and width to 55 so that you could more easily set layout

不要约束宽度和高度,因为它有一个固定的宽度和高度55,论文,建议调整高度和宽度为55,开题报告,使您可以更容易地设置布局

Step 3

You can change the UIView bagroundcolor to adjust the FloatingActionButtonColor
可以转换UIView的背景颜色

Step 4

kinds of animation

enum openButtonType { case slideUp case slideDown case popUp case popDown }

Demo Code

button.kyDelegate = self button.openType = .popUp button.plusColor = UIColor.black // Change plus color button.fabTitleColor = UIColor.white // Change title color button.add(color:UIColor.red) button.add(color:UIColor.orange) button.add(color: UIColor.brown, title: 'Hello') button.add(color: UIColor.green, title: 'Are you ready ?', image: UIImage(named: 'Map Filled-50.png')!) { (item) in let alert = UIAlertController(title: 'Hello', message: 'Are you ok?', preferredStyle: .alert) let ok = UIAlertAction(title: 'ok', style: .default, handler: nil) alert.addAction(ok) self.present(alert, animated: true, completion: nil) } // add a itemButton with closure 、 image 、 title and buttoncolor Step 5

You do something when button opening and closing with delegate (KYButtonDelegate) function , they are both optional function below
你可以在 当按钮打开和关闭与委托(KYButtonDelegate)函数中做一些操作/

func openKYButton(_ button: KYButton) { } func closeKYButton(_ button: KYButton) { } Author

Shane Lin

Email:lawlietop@gmail.com


这里还有:


还可以点击去查询:
[Swift]    [KYFloatingActionButton]    [【Swift】KYFloatingActionButton]   

请扫码加微信 微信号:sj52abcd


下载地址: http://www.taolw.com/down/8675.docx
  • 上一篇:MUSle毕业设计epGraph
  • 下一篇:【Swift】HQ毕业设计PagerViewController