FTPopOverMenu is a pop over menu for iOS which is maybe the easiest one to use, supports both portrait and landscape. It can show from any UIView, any UIBarButtonItem and any CGRect. Simplest APIs, enable you to change the style in one line of code.
- clone this repo.
- Simply drop the '/FTPopOverMenu' folder into your project.
- import 'FTPopOverMenu.h'
FTPopOverMenu is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'FTPopOverMenu' [FTPopOverMenu setTintColor:[UIColor redColor]]; [FTPopOverMenu setTextColor:[UIColor blackColor]]; [FTPopOverMenu setPreferedWidth:200]; [FTPopOverMenu showForSender:sender
withMenu:@[@"MenuOne",@"MenuTwo",@"MenuThr"]
doneBlock:^(NSInteger selectedIndex) {
} dismissBlock:^{
}]; [FTPopOverMenu showForSender:sender
withMenu:@[@"MenuOne",@"MenuTwo",@"MenuThr"]
imageNameArray:@[@"setting_icon",@"setting_icon",@"setting_icon"]
doneBlock:^(NSInteger selectedIndex) {
} dismissBlock:^{
}]; [FTPopOverMenu showFromSenderFrame:CGRectMake(self.view.frame.size.width - 40, 20, 40, 40)
withMenu:@[@"123",@"234",@"345"]
doneBlock:^(NSInteger selectedIndex) {
} dismissBlock:^{
}]; [FTPopOverMenu showFromSenderFrame:CGRectMake(self.view.frame.size.width - 40, 20, 40, 40)
withMenu:@[@"123",@"234",@"345"]
imageNameArray:@[@"setting_icon",@"setting_icon",@"setting_icon"]
doneBlock:^(NSInteger selectedIndex) {
} dismissBlock:^{
}];- First: add action with event to you barButtonItems
[self.navigationItem setRightBarButtonItem:[[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStyleDone target:self action:@selector(onNavButtonTapped:event:)]];- Second: implement the action
-(void)onNavButtonTapped:(UIBarButtonItem *)sender event:(UIEvent *)event
{
[FTPopOverMenu showFromEvent:event
withMenu:@[@"123",@"234",@"345"]
imageNameArray:@[@"setting_icon",@"setting_icon",@"setting_icon"]
doneBlock:^(NSInteger selectedIndex) {
} dismissBlock:^{
}];
}- If you like it, or maybe wanna use it in your own projects, please give me a
star. - Looking for another way of doing this? Take a look at my another FTPopMenu at here. It was another way of showing pop over menus, which is wrapped from
UIPopoverViewController, and more genetic and more good-looking. Feel free to try it.
FTPopOverMenu is available under the MIT license. See the LICENSE file for more info.


