PKFloatingButton
浮动按钮,可以在窗口或指定视图中浮动
要求
- iOS 8.0+
- Xcode 9.2
安装
对于手动安装,将源文件夹拖入您的项目中。
对于使用 CocoaPod,将此行添加到您的 Podfile
pod 'PKFloatingButton'
使用方法
启用浮动
- 只需使用
shared
实例的PKFloatingButton
调用enableFloating()
方法
示例
PKFloatingButton.shared.enableFloating(onView: self.view, viewToExpand: nil, withImage: #imageLiteral(resourceName: "help_white"), onTapHandler: nil)
禁用浮动的用途
- 只需用
disableFloating()
方法调用PKFloatingButton
的shared
实例。
示例
PKFloatingButton.shared.disableFloating()
许可证
PKFloatingButton 以 MIT 许可证发布。