TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Hesham Abd-ELmegid.
HMSideMenu allows you to display a menu of items that show from the left, right, top or bottom of a view controller with a delightful animation.
Check this video to see how exactly it works.
QuartzCore.framework
to your linked frameworks.#import "HMSideMenu.h"
where you want to add the control.HMSideMenuItem *twitterItem = [[HMSideMenuItem alloc] initWithSize:CGSizeMake(40, 40) action:^{
NSLog(@"tapped twitter item");
}];
UIImageView *twitterIcon = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
[twitterIcon setImage:[UIImage imageNamed:@"twitter"]];
[twitterItem addSubview:twitterIcon];
HMSideMenu *sideMenu = [[HMSideMenu alloc] initWithItems:@[twitterItem]];
[self.sideMenu setVerticalSpacing:1.0f];
[self.view addSubview:self.sideMenu];
Please check the included demo project for more options.
Thanks to @bryanoltman's CAAnimation-EasingEquations for the animation easing function.
HMSideMenu is licensed under the terms of the MIT License. Please see the LICENSE file for full details.
If this code was helpful, I would love to hear from you.