
匿名 2017-06-20 16:10
Swift iOS 菜单和圆形布局库 FanMenu
回复:0 查看:7363 感兴趣:170 赞:5
FanMenu 是一个菜单和
圆形布局类库,基于
Macaw,用Swift编写。
用法
1. 在您的故事板或程序中创建UIView。
2. 将FanMenu设置为UIView类
3. 设置按钮


用法
1. 在您的故事板或程序中创建UIView。
2. 将FanMenu设置为UIView类
3. 设置按钮
fanMenu.button = FanMenuButton( id: "main", image: "plus", color: Color(val: 0x7C93FE) )4. 设置菜单项
fanMenu.items = [ FanMenuButton( id: "exchange_id", image: "exchange", color: Color(val: 0x9F85FF) ), ... FanMenuButton( id: "visa_id", image: "visa", color: Color(val: 0xF55B58) ) ]5. 添加事件处理程序
// call before animation fanMenu.onItemDidClick = { button in print("ItemDidClick: \(button.id)") } // call after animation fanMenu.onItemWillClick = { button in print("ItemWillClick: \(button.id)") }