从 UIResponderStandardEditActions 执行复制/剪切
这些是 UIMenuController 声明的标准操作 http://developer.apple.com/library/ios/#documentation/uikit/reference/UIResponderStandardEditActions_Protocol/UIResponderStandardEditActions.html
如何手动执行这些方法,例如从另一个 UIMenuItem 或其他地方? 我找不到正确的选择器:(
- [self cut:sender];
- [UIResponder cut:sender];
- [[UIMenuController sharedMenuController] cut:sender];
- (void) cut: (id) 发件人 {[super cut:sender];}
到目前为止,这些都不起作用,没有找到选择器。
These are standart actions for UIMenuController declared http://developer.apple.com/library/ios/#documentation/uikit/reference/UIResponderStandardEditActions_Protocol/UIResponderStandardEditActions.html
How can I perform these methods manually, like from another UIMenuItem or whatever?
I can't find the right selector:(
- [self cut:sender];
- [UIResponder cut:sender];
- [[UIMenuController sharedMenuController] cut:sender];
- (void) cut: (id) sender {[super cut:sender];}
So far non of these don't work, selector not found.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要沿着响应者链发送操作,从“第一响应者”开始。试试这个:
如果您有触发该操作的 UIEvent,您可以将其作为最后一个参数传递。
您可以在 中阅读有关响应者链的信息iOS 事件处理指南:事件传递:响应者链。
You need to send the action along the responder chain, starting with the "first responder". Try this:
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.