Code Monkey home page Code Monkey logo

tycirclemenu's Introduction

TYCircleMenu

滚轮式菜单

A circle menu in the style of wheel.

###实现效果(Examples) 默认设置

设置可见数量,点击后隐藏

###Waht you can do 1, 点击按钮,显示或隐藏菜单 (click the button, show or hide menus)

2,点击具体项,获取该项的index,进而做后续操作 (Click on the specific item, gets the index of the item, and follow-up actions)

3,自定义菜单个数,无上限 (The number of custom menus, no limit)

4,自定义可见的菜单数量 (Number of custom visible menus)

5,自定义菜单图标和标题 (Custom menu icons, and the title)

###Usage ####Initialize

	NSArray *imageNames = @[@"test_0",@"test_1",@"test_2"];
    NSArray *titles     = @[@"one",@"two",@"three"];
    //itemOffset是第一个菜单项距离左边界的距离
    TYCircleMenu *menu = [[TYCircleMenu alloc]initWithRadious:240 itemOffset:20 imageArray:imageNames titleArray:titles menuDelegate:self];
    //以下设置为可选
    menu.visibleNum = 3;     //设置可见的菜单数量,默认是4个
    menu.isDismissWhenSelected = YES;   //点击菜单项,是否隐藏菜单,默认不隐藏
    //添加到当前视图
    [self.view addSubview:menu];

####implement protocol method

- (void)selectMenuAtIndex:(NSInteger)index {
    NSLog(@"选中:%zd",index);
}

###Version

v1.1 增加循环滚动的支持

##License This project is under MIT License. See LICENSE file for more information.

tycirclemenu's People

Contributors

yeekyo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.