99热99这里只有精品6国产,亚洲中文字幕在线天天更新,在线观看亚洲精品国产福利片 ,久久久久综合网

歡迎加入QQ討論群258996829

Swift iOS 菜單和圓形布局庫 FanMenu

發(fā)布時間:2017-06-20 16:10  回復:0  查看:7135  感興趣:170  贊:5   最后回復:2017-06-20 16:10  
FanMenu 是一個菜單和 圓形布局類庫,基于 Macaw,用Swift編寫。 
Swift iOS 菜單和圓形布局庫 FanMenu  Swift iOS 菜單和圓形布局庫 FanMenu

用法
1. 在您的故事板或程序中創(chuàng)建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)")
}
  

相關(guān)開源代碼

您還未登錄,請先登錄

熱門帖子

最新帖子

?