Skip to content

lionchina/CircleMenu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CircleMenu

A circle menu (iOS version). You can customize the number of buttons with image and title between 1 and 9.

Animation

Installation

  1. Drag the CircleMenu/LLCircleMenu folder into your project.
  2. Add #include "LLCircleMenu.h", where you want to use it.

Usage

Initialization

_circleMenuDemo = [[LLCircleMenu alloc] initWithFrame:CGRectMake(0, 0, 270, 270) andDelegate:self];
_circleMenuDemo.center = CGPointMake(160, 240);
[self.view addSubview:_circleMenuDemo];

Customization

int randomcount = arc4random() % 10;
NSMutableArray *arrayItem = [[NSMutableArray alloc] init];
for (int i = 0; i < randomcount; i++) {
  [arrayItem addObject:[[NSDictionary alloc] initWithObjectsAndKeys:[NSString stringWithFormat:@"i%d", i], @"title", @"item_bg.png", @"image", nil]];
}
[_circleMenuDemo setViewWithInfo:arrayItem];  

Override the protocol

- (void)circlemenu:(id)circlemenu didSelectRowAtIndex:(NSInteger)index;

Licence

This code is distributed under the terms and conditions of the MIT license.

About

iOS - Circle Menu with title and image

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published