A simple, elegant pop-up menu view
- easy to use
- easy to customization
- iOS7+
first thing, import the main header file
#import "FEPopupMenuController.h"
then, you can using FEPopupMenuItem
initialize FEPopupMenuController
, support text or text&icon (icon size 15x15 point)
FEPopupMenuItem *item = [[FEPopupMenuItem alloc] initWithTitle:@"title" iconImage:image action:^{
NSLog(@"selected item1...");
}];
FEPopupMenuController *popupMenuController = [[FEPopupMenuController alloc] initWithItems:@[item]];
Suggest : The title can not be longer than four characters. and item not too much.
show time
[popupMenuController showInViewController:self atPosition:CGPointMake(100,100);
dismiss
[popupMenuController dismiss];
-
You can set
titleColor
to change the title color of each FEPopupMenuItem, respectively. -
You can call the
moveContentViewToPosition
method to change the location of the nemu in real time.(see demo)
pod 'FEPopupMenuController'
MIT