Popover Menu for iOS

Popover Menu for iOS

A great looking alternative to UIActionSheet. Use this popover menu to show a pixel perfect grid of buttons.

Popover Menu is a custom component that you can use to show a pixel perfect popover menu containing a grid of buttons. This component is specially designed to be used with UIBarButtonItem buttons.

Popup over menu for iOS

The background of the popup is completely drawn using Core Graphics. Thanks to Core Graphics the borders and shadows are pixel perfect and just gorgeous. Since no images are used for the background you can easily modify the look of the popover menu by playing with the values of the constants defined in the class YLPopoverMenu.m.

You can customize the following properties of Popover Menu:

  • background color
  • shadow color
  • shadow offset
  • shadow blur
  • border radius

Popover Menu supports landscape and portrait orientations!

Popup over menu demo

Hide

How to Use

1. Create a YLPopoverMenu Object.

NSMutableArray *items = [NSMutableArray array];
[items addObject:[YLMenuItem menuItemWithTitle:@"Home" icon:[UIImage imageNamed:@"hi.png"] pressedIcon:[UIImage imageNamed:@"hpi.png"]]];
[items addObject:[YLMenuItem menuItemWithTitle:@"Messages" icon:[UIImage imageNamed:@"mi.png"] pressedIcon:[UIImage imageNamed:@"mpi.png"]]];
[items addObject:[YLMenuItem menuItemWithTitle:@"Photos" icon:[UIImage imageNamed:@"pi.png"] pressedIcon:[UIImage imageNamed:@"ppi.png"]]];

YLPopoverMenu* menu = [YLPopoverMenu popoverMenuWithItems:items target:self];
[menu setDelegate:self];
[menu presentPopoverFromBarButtonItem:button animated:YES];

2. Implement the delegate method.

- (void)popoverMenu:(YLPopoverMenu *)menu didSelectItem:(int)item {
    NSLog(@"You tapped on item %@", [menu buttonTitleAtIndex:item]);
}

3. Or attach individual selectors to menu items.

[YLMenuItem menuItemWithTitle:@"Home" icon:[UIImage imageNamed:@"hi.png"] pressedIcon:[UIImage imageNamed:@"hpi.png" selector:@selector(homeTapped)]

// YLPopoverMenu will call this method on the main thread
- (void)homeTapped {
    NSLog(@"You tapped on the Home button.");
}
You need to log-in or create an account
  • Create an account
  • Log-in

Please use your real name.

Activation link will be sent to this address.

Minimum 8 characters

Enter your password again

Clicking this button confirms you read and agreed to the terms of use and privacy policy.

X

Save your watchlist

Fill your details below to receive project updates from your watch list - including new versions, price changes and discounts.

I agree to the terms of use and privacy policy.

  • Very disappointed as not until you come to use it do you see a lot of caveats with it!

    Cannot use custom UIBarButtonItems which is really bad. This means you have to use one of the stock buttons.

    Also you have to have your button at the edge of the toolbar which again is not something we all will have!
    LA Lee Armstrong
    2 years ago, 0 comments
    Was this helpful?
    Flag 3 of 5 people found this review helpful
  • Great product that makes an easy to use but aesthetically pleasing UI
    KS Kyle Steelman
    2 years ago, 0 comments
    Was this helpful?
    Flag 1 of 1 people found this review helpful
  • Perfect
    KB Kassem M. Bagher
    2 years ago, 0 comments
    Was this helpful?
    Flag 1 of 1 people found this review helpful
Post a comment

Or enter your name and Email
  • M Mahendra 3 days ago
    Just wondering... does this work with Xcode 5 & iOS7?
    • Kemal Taskin Developer 2 days ago
      Hi Mahendra, Yes, the codebase will work with Xcode 5 but iOS 7 is not supported.
  • B Brad 10 months ago
    Hello you have done great work over here, its very helpfull, bt somewhere i got stucked.. can i have the source code of this project.. i will be very thankfull to you if you will provide me a source code....
    • Kemal Taskin Developer 10 months ago
      Hi Brad, Are you working on your own implementation?
    • D duc 7 months ago
      it too expensive!
  • SW SANJAY WAZA License holderSingle App License 11 months ago
    How can I display the popover in middle of the screen by changing X and Y positions ?
    • Kemal Taskin Developer 11 months ago
      Hi Sanjay, Popover Menu is designed to be used with UIBarButtonItems in toolbars or navigation bars. The x and y positions are automatically calculated and can't be changed.