search

Home  >  Q&A  >  body text

objective-c - UIMenuController cannot be displayed and conflicts with UIActionSheet

I encountered a problem today. Long pressing the chat cell can display the UIMenuController normally, as shown below.

But once the UIActionSheet is opened, the UIMenuController becomes unresponsive.

As above, after I opened UIActionSheet, no matter how I pressed it, UIMenuController could not appear.

The code is as follows [self becomeFirstResponder]; It returns yes. I wonder if UIActionSheet occupies the first responder?

[self becomeFirstResponder];
    
    UIMenuItem *copyItem = [[UIMenuItem alloc] initWithTitle:@"复制" action:@selector(copyString:)];
    UIMenuItem *sendAgain = [[UIMenuItem alloc] initWithTitle:@"重发" action:@selector(sendAgain:)];
    UIMenuItem *earphonePlayItem = [[UIMenuItem alloc] initWithTitle:@"听筒播放" action:@selector(earphonePlay:)];
    UIMenuItem *speakerPlayItem = [[UIMenuItem alloc] initWithTitle:@"扬声器播放" action:@selector(speakerPlay:)];
淡淡烟草味淡淡烟草味2806 days ago882

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-05-02 09:35:17

    Have you solved it bro? I also encountered the same situation qq: 1217468488

    reply
    0
  • Cancelreply