I have a button that is linked to an action in my view controller.
This action is supposed to pop up a UIMenuController. Here's the code:

UIMenuController *menuController = [UIMenuController sharedMenuController];
    UIMenuItem *listMenuItem = [[UIMenuItem alloc]
initWithTitle:@"List" action:@selector(addList:)];

    [menuController setMenuItems:[NSArray arrayWithObject:listMenuItem]];
    [menuController setTargetRect:CGRectMake(10.0, 10.0, 0, 0)
inView:addButton];
    [menuController setMenuVisible:YES animated:YES];

    [listMenuItem release];

I can confirm that the action method is being called, and that the
menu items are being correctly set in the menu controller, but the
menu just doesn't show up.

Any help is appreciated.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to