AMRippleButton
屏幕截图
示例
要运行示例项目,克隆仓库,然后先从 Example 目录运行 pod install
。
要求
iOS 10 及以上版本
安装
AMRippleButton 可通过 CocoaPods 获得。要安装它,只需将以下行添加到 Podfile 中:
pod 'AMRippleButton'
使用方法
在Storyboard中使用
如何使用
-
首先,在Storyboard中创建UIButton实例。
-
然后在Identity Inspecter中输入类名为 "RippleButton"。
-
这就完成了。
-
可选,你可以在Attributes Inspecter中输入Ripple颜色和圆角半径。
-
除非你指定,否则按钮的色调颜色将被用作涟漪颜色。
在Swift编码中使用
- 在类中导入AMRippleButton。
- 你可以像这样实例化RippleButton实例... let button = RippleButton(frame: ...)
作者
ohara k perverse, [email protected]
许可证
AMRippleButton在MIT许可证下可用。更多信息请参阅LICENSE文件。