Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/levey/AwesomeMenu
Path 2.0 menu using CoreAnimation :)
https://github.com/levey/AwesomeMenu
List: AwesomeMenu
Last synced: 1 day ago
JSON representation
Path 2.0 menu using CoreAnimation :)
- Host: GitHub
- URL: https://github.com/levey/AwesomeMenu
- Owner: levey
- License: other
- Created: 2011-12-01T06:12:49.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2018-09-28T10:17:06.000Z (about 6 years ago)
- Last Synced: 2024-10-29T15:34:40.921Z (10 days ago)
- Language: Objective-C
- Homepage: https://github.com/levey/AwesomeMenu
- Size: 864 KB
- Stars: 4,997
- Watchers: 196
- Forks: 790
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-github-android-ui - AwesomeMenu - 与Path的故事菜单具有相同外观的菜单 (菜单(Menu))
- awesome - AwesomeMenu
- awesome - AwesomeMenu - Path 2.0 menu using CoreAnimation :) (etc)
- awesome - AwesomeMenu - Path 2.0 menu using CoreAnimation :) (etc)
README
### DO NOT USE IT TO COPY PATH!
---
AwesomeMenu is a menu with the same look as the story menu of [Path](https://path.com/).
---
**How To**:
Create the menu by setting up the menu items:
UIImage *storyMenuItemImage = [UIImage imageNamed:@"bg-menuitem.png"];
UIImage *storyMenuItemImagePressed = [UIImage imageNamed:@"bg-menuitem-highlighted.png"];
UIImage *starImage = [UIImage imageNamed:@"icon-star.png"];
AwesomeMenuItem *starMenuItem1 = [[AwesomeMenuItem alloc] initWithImage:storyMenuItemImage
highlightedImage:storyMenuItemImagePressed
ContentImage:starImage
highlightedContentImage:nil];
AwesomeMenuItem *starMenuItem2 = [[AwesomeMenuItem alloc] initWithImage:storyMenuItemImage
highlightedImage:storyMenuItemImagePressed
ContentImage:starImage
highlightedContentImage:nil];
// the start item, similar to "add" button of Path
AwesomeMenuItem *startItem = [[AwesomeMenuItem alloc] initWithImage:[UIImage imageNamed:@"bg-addbutton.png"]
highlightedImage:[UIImage imageNamed:@"bg-addbutton-highlighted.png"]
ContentImage:[UIImage imageNamed:@"icon-plus.png"]
highlightedContentImage:[UIImage imageNamed:@"icon-plus-highlighted.png"]];Then, setup the menu and options:
AwesomeMenu *menu = [[AwesomeMenu alloc] initWithFrame:self.window.bounds startItem:startItem optionMenus:[NSArray arrayWithObjects:starMenuItem1, starMenuItem2]];
menu.delegate = self;
[self.window addSubview:menu];You can also use menu options:
to locate the center of "Add" button:
menu.startPoint = CGPointMake(160.0, 240.0);
to set the rotate angle:
menu.rotateAngle = 0.0;
to set the whole menu angle:
menu.menuWholeAngle = M_PI * 2;
to set the delay of every menu flying out animation:
menu.timeOffset = 0.036f;
to adjust the bounce animation:
menu.farRadius = 140.0f;
menu.nearRadius = 110.0f;to set the distance between the "Add" button and Menu Items:
menu.endRadius = 120.0f;
---
Twitter: [@LeveyZhu](https://twitter.com/#!/LeveyZhu)
Sina Weibo: [@LeveyZhu](http://weibo.com/leveyzhu)
Thanks for [pashields](https://github.com/pashields) providing the [youtube demo](http://www.youtube.com/watch?v=vddaYMtETjo) :)
Thanks for [acoomans](https://github.com/acoomans/QuadCurveMenu) for the options.
![screenshots](http://k.minus.com/ib1kHc4lnLB8bd.gif) ![screenshots](http://k.minus.com/iovTFVTQQ192K.gif) ![screenshots](http://k.minus.com/i4BrO2tfCJxzk.gif)