NSNotification for UIMenuControllerWillShowMenuNotification
- by Bob Keathley
I am trying to use the NSNotificationCenter to get UIMenuControllerDidShowMenuNotification from a UIWebView. I have the following code in my ViewDidLoad method:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(menuControllerWillHide:) name:UIMenuControllerWillHideMenuNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(menuControllerWillShow:) name:UIMenuControllerWillShowMenuNotification object:nil];
And methods:
- (void)menuControllerWillHide:(NSNotification *)notification {
}
(void)menuControllerWillShow:(NSNotification *)notification {
[[self navigationItem] setRightBarButtonItem:highlightBtn animated:NO];
}
But I never get the Notifications? Any help would be helpful