• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Ramotion/circle-menu: ⭕️ CircleMenu is a simple, elegant UI menu with a circul ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

Ramotion/circle-menu

开源软件地址(OpenSource Url):

https://github.com/Ramotion/circle-menu

开源编程语言(OpenSource Language):

Swift 97.7%

开源软件介绍(OpenSource Introduction):

CIRCLE MENU

Simple, elegant UI menu with a circular layout and material design animations


We specialize in the designing and coding of custom UI for Mobile Apps and Websites.

Stay tuned for the latest updates:


Twitter CocoaPods CocoaPods CocoaPods Carthage compatible codebeat badge Travis Donate

Requirements

  • iOS 9.0+
  • Xcode 9.0.1

Installation

Just add CircleMenuLib folder to your project.

or use CocoaPods with Podfile:

pod 'CircleMenu'

or Carthage users can simply add to their Cartfile:

github "Ramotion/circle-menu"

Usage

with storyboard
  1. Create a new UIButton inheriting from CircleMenu

  2. Add images for Normal and Selected state

  3. Use delegate method to configure buttons

func circleMenu(circleMenu: CircleMenu, willDisplay button: UIButton, atIndex: Int)
  1. Use properties to configure CircleMenu
@IBInspectable var buttonsCount: Int = 3
@IBInspectable var duration: Double = 2 // circle animation duration
@IBInspectable var distance: Float = 100 // distance between center button and buttons
programmatically
let button = CircleMenu(
  frame: CGRect(x: 200, y: 200, width: 50, height: 50),
  normalIcon:"icon_menu",
  selectedIcon:"icon_close",
  buttonsCount: 4,
  duration: 4,
  distance: 120)
button.delegate = self
button.layer.cornerRadius = button.frame.size.width / 2.0
view.addSubview(button)
delegate methods
// configure buttons
optional func circleMenu(circleMenu: CircleMenu, willDisplay button: UIButton, atIndex: Int)

// call before animation
optional func circleMenu(circleMenu: CircleMenu, buttonWillSelected button: UIButton, atIndex: Int)

// call after animation
optional func circleMenu(circleMenu: CircleMenu, buttonDidSelected button: UIButton, atIndex: Int)

// call upon cancel of the menu - fires immediately on button press
optional func menuCollapsed(circleMenu: CircleMenu)

// call upon opening of the menu - fires immediately on button press
optional func menuOpened(circleMenu: CircleMenu)


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap