测试已测试 | ✗ |
语言语言 | SwiftSwift |
许可 | MIT |
发布最新版本 | 2017年8月 |
SwiftSwift 版本 | 3.0 |
SPM支持 SPM | ✗ |
由 PhuongVNC 维护。
简单的圆形菜单动画
要运行示例项目,请克隆仓库,并首先在 Example 目录下运行 pod install
将文件夹 CPMenuView
拖放到你的项目中。
CPMenuView 可通过 CocoaPods 获取。要安装它,只需将以下行添加到你的 Podfile:
pod 'CPMenuView', '~> 1.0'
你可以创建和自定义主页按钮
let menuButton = HomeMenuButton(image: UIImage(named:"menu")!, size: CGSize(width: 50, height: 50))
menuButton.pressedImage = UIImage(named: "close")
设置菜单的动画
let animator = CPMenuAnimator(commonDuration: 0.5, commonSpringWithDamping: 0.5, commonSpringVelocity: 10)
创建菜单视图
menuView = CPMenuView(parentView: self.view, homeButton: menuButton, animator: animator,type: .all,radius: 130, isClockWise: true)
menuView.delegate = self
menuView.datasource = self
你需要为主页按钮设置位置
menuView.setHomeButtonPosition(position: CGPoint(x: view.center.x, y: view.center.y - 100))
欢迎为错误修正或改进做出贡献。请随时提交 pull request。
CPMenuView 适用于 MIT 许可。有关更多信息,请参阅 LICENSE 文件。