I have a problem with the UIMenuController
on my iPhone 6 when I use the standard display mode and device is in landscape mode. On iPhone 6 Plus the problem is in both modes. Maybe it's depends on screen resolution.
In that case, the UIMenuController
will be truncated left and/or right. It seems that the UIMenuController
can have maximum bounds as if the phone is in portrait mode.
See UIMenuController
truncated (iPhone6 landscape schematic):
http://imageshack.com/a/img631/8470/ozlaGe.jpg "iPhone6 landscape"
For me it seems like an iOS8+iPhone 6 bug. The code didn't change for a long time and worked.
In zoomed display mode, UIMenuController
will be displayed correctly like on all other iPhones/iPads incl. iOS7.
... define UIMenuItems....
[self becomeFirstResponder]; // canBecomeFirstResponder returns YES;
UIMenuController *menu = [UIMenuController sharedMenuController];
[menu setMenuItems:items];
.. define frame...
[menu setTargetRect:frame inView:self];
[menu setMenuVisible:YES animated:YES];
Fixed: see comment from Iliya Barenboim