So i would like to use the UIMenuController to display text. i would like to add in help buttons (press a little button and something will pop up describing what something does) that would display either a UIMenuController or something that looks similar to it. it would just display a few lines of text and dismiss when pressed.
it kinda looks like UIMenuController is only meant for button selection. i could just use one button and set the title to the message i wish to display, but am doubtful on how well that would work. are there any other options available?
A UIMenuController takes it content from its
menuItemsproperty and the documentation says :So you are obliged to use UIMenuItem objects as content for your
UIMenuController. UIMenuItem only inherits fromNSObject, and stores only a title and an action, both required. This make you unable to use any other kind of data asUIMenuItem.As it is not an
UIView, you can give it aUIButtonor aUIImageView.You could think to override
UIMenuControllerbut again it is a direct child ofNSObject, so it doesn’t have any behavior for customization.The only solution left to you, is to rewrite your own
UIMenuController, deriving it from UIToolbar for example. This would give you more or less the same look, you just have to customize the arrow and the round corner.