user1120133
user1120133

Reputation: 3234

Hide UIMenuController

Want to hide UIMenuController which shows cut, copy, paste, select, select all menu.

Any one knows how to do it

Upvotes: 2

Views: 2568

Answers (1)

WDUK
WDUK

Reputation: 19030

The documentation for UIMenuController is available here http://developer.apple.com/library/ios/#documentation/iPhone/Reference/UIMenuController_Class/UIMenuController.html

The UIMenuController is a sharedInstance, so you're able to access it from anywhere as follows:

UIMenuController* menu = [UIMenuController sharedMenuController];

The message you need to send it to hide it is as so:

// If you don't want it animated, use NO for the 2nd parameter
[menu setMenuVisible:NO animated:YES];

As for the exact context you wish to use this in, I don't know much about it, but this is ultimately how you hide a UIMenuController

Upvotes: 5

Related Questions