Questions tagged [uimenuitem]

An instance of the UIMenuItem class represents a custom item in the editing menu managed by the UIMenuController object. Custom menu items appear in the menu after any validated system items. A UIMenuItem object has two properties: a title and an action selector identifying the method to invoke in the handling responder object. Targets are not specified; a suitable target is found via normal traversal of the responder chain.

Available in iOS 3.2 and later in UIKit.

An instance of the UIMenuItem class represents a custom item in the editing menu managed by the UIMenuController object.

Custom menu items appear in the menu after any validated system items. A UIMenuItem object has two properties: a title and an action selector identifying the method to invoke in the handling responder object. Targets are not specified; a suitable target is found via normal traversal of the responder chain. To have custom menu items appear in the editing menu, you must add them to the menuItems property of the UIMenuController object.

54 questions
1
vote
1 answer

how to customized the define function in ios

I had develop a instant meaning checker like one in UIMENU Button,it working fine but since i had used the alert method to show the meaning,the appearnce of the alert is not good.can any one tell me how to get the appearance of that of the define…
1
vote
1 answer

Display UIMenuController using button click

I have UIWebView. I need to select some text from UIWebView. So im using UIMenuController for MenuItem. I need to display UIMenuController while button click. But it's not working. If i paste the code inside ViewDidLoad it's working. code: [wbCont…
1
vote
1 answer

UICollectionView UIMenuController get cell

I successfully added custom UIMenuItems to the context menu of a UICollectionViewCell. When using the builtin actions (cut / copy / paste) the -collectionView:performAction:forItemAtIndexPath:withSender delegate method gets called. But it never gets…
1
vote
0 answers

IOS:Create subMenu using UIMenuItemController inside a UIWebView

I would like the behaviour is that: When I click on my custom UIMenuItem, it would show another list of UIMenuItems to choose. I have implemented in that way. @implementation CustomUIWebView{ BOOL clickedShowSubMenu; NSArray *mainMenuItems; …
Yeung
  • 2,202
  • 2
  • 27
  • 50
1
vote
2 answers

UIMenuItem not appearing after switching to other tab

I have been implemented an UIMenuItem to show by long-pressing an item on a TableViewController that is an element of a UITabBarController. I did that like below - (void)viewDidLoad { resendMenuItem = [[UIMenuItem alloc] initWithTitle:@"Kirim…
M Rijalul Kahfi
  • 1,460
  • 3
  • 22
  • 42
0
votes
1 answer

Can I add NSAttributedString in UIMenuItem's title instead of String?

I would like to add NSAttributedString in UIMenuItem's title instead of String, but I don't see any possible way of doing this. Is it even possible to maybe subclass UIMenuItem or something else to achieve this? I saw that on Telegram application on…
0
votes
1 answer

Disable the flickering/blinking of UIMenuItems in UIMenuController in Swift

How can I get rid of the flickering/blinking of UIMenuItems in a UIMenuController? I currently have copy and paste items, but when my app displays the menu inside the action of a UILongPressGestureRecognizer, they start blinking. @objc func…
sk123
  • 580
  • 1
  • 8
  • 29
0
votes
1 answer

Displaying menu on longpress on UIView in UITableViewCell

In an IOS app, I want to display a UIMenuController when longpressing an UIView located in UITableViewCell. -(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { myTableViewCell…
Laurent Crivello
  • 3,809
  • 6
  • 45
  • 89
0
votes
2 answers

How to use More menucontroller in View controller

Can Anyone help me, i'm having problem with UIMenucontroller.In here, i have to use two menucontroller in single viewcontroller. For First menu only "paste",for other menu "copy","select","select all" When i'm using shared menucontroller it affects…
0
votes
1 answer

Swift Error, UIMenuItem to UIview/UIlabel for Copy

I am having an issue in finding the UIview/Casting from UImenuItem and UILongPressGestureRecognizer. I can see the copy button but once i click i am having an error of casting. Below is My Code ViewDidLoad let copyLongPress =…
dhaval shah
  • 4,499
  • 10
  • 29
  • 42
0
votes
1 answer

How to automatically set the language of UIMenuItems?

I am trying to add speech functionality to my app via the UIMenuController, with a custom UIMenuItem. My question is this: If I need to support multiple languages, do I have to define the title of the UIMenuItems in those multiple languages as well?…
Kaisp
  • 326
  • 2
  • 8
0
votes
2 answers

Why isn't my UIMenuController shown in my view?

I can't figure out why my UIMenuController doesn't show up in my view. When I long-press the button, I can see that all instructions are executed, but menu is not shown. public class MySingleArticleView : UIView { private MyArticleViewController…
0
votes
1 answer

UIMenuItem selector not fired when selection caret is not fully visible

I am creating a UIMenuItem (and initialized with a UIMenuController) called which has the text "Share" (refer screenshot), and I am using this for selecting some text from the textView and sharing that content. shareMenuItem=[[UIMenuItem alloc]…
Vignesh PT
  • 624
  • 12
  • 28
0
votes
0 answers

Systemwide setting of textcolor in UIMenuitem

I want to change the color in the UIMenuItem. I have changed the color of [UIButton appearance] and this affects the UIMenuItems (copy/paste/etc). Is there a way to set another text color than the button text color?
netshark1000
  • 7,245
  • 9
  • 59
  • 116
0
votes
1 answer

UimenuController-How to remove default menu items

how to remove defaults menu items like copy ,paste and select from UIMenuController
user3608500
  • 835
  • 4
  • 10