Perform copy/cut from UIResponderStandardEditActions

后端 未结 1 964
被撕碎了的回忆
被撕碎了的回忆 2020-12-20 08:13

These are standart actions for UIMenuController declared http://developer.apple.com/library/ios/#documentation/uikit/reference/UIResponderStandardEditActions_Protocol/UIResp

相关标签:
1条回答
  • 2020-12-20 09:10

    You need to send the action along the responder chain, starting with the "first responder". Try this:

    [[UIApplication sharedApplication] sendAction:@selector(cut:) to:nil from:self forEvent:nil];
    

    If you have the UIEvent that triggered the action, you might pass that as the last parameter.

    You can read about the responder chain in Event Handling Guide for iOS: Event Delivery: The Responder Chain.

    0 讨论(0)
提交回复
热议问题