views:

52

answers:

1

Hello,

I'm working with the UIMenuController and it disappears when the screen is clicked. When I show the menu I need to wait for the user to select an item before the menu fades away but if the click anywhere on the screen (not on the menu bar) the menu will still fade out. Is there any way to prevent this?

Does it possibly have something to do with the UIResponder class? I've been reading up on this but I'm not so sure I totally understand the responder concept yet.

Thanks.

A: 

You can listen for the Notification of UIMenuControllerWillHideMenuNotification.

Scroll right to the end of this page: Apple's Device Features Programming Guide and there's a section "Dismissing the Editing Menu".

This code keeps it visible:

[UIMenuController setMenuController].menuVisible = YES;
Caroline