【发布时间】:2012-10-22 07:07:48
【问题描述】:
我正在使用基于消息的 iPhone 应用程序。在我的应用程序中看起来像 iMessage 原生 iOS 应用程序。 I made Bubbles with used UIImageView and UILabel. I made UILabel as clickable and showing Copy option. It is working fine when the message input UITextView is not in active.
1. I can show the "Copy" option when we clicking UILabel and the UITextView is not becomeFirstResponder.
2. When the user clicking the MessageTextView (UITextView) from the bottom of the screen the UITextView becoming first responder and keyboard is showing now. In this scenario if the user clicking the messabe bubble (UILabel) the UIMenuItem showing "Paste" on the bubble instead of "Copy".
3. If i click "Paste" from the bubble UIMenuItem already copied text will be pasting in UITextView. So the control fully in UITextView UIMenuController not activated in UILabel. So i cleared the text from UIPateBoard when the user clicking the Bubble (UILabel).
4. Now the UIMenuController not showing up even [self becomeFirstResponder]; not becoming in UILabel class.
原因是当 UITextView 在 becomeFirstResponder 中的控件完全在其中。不来 UILabel。你能帮我解决这个问题吗?
How to show UIMenuItem "Copy" when the user clicking UILabel if the keyboard is in visible the control is in UITextView?你能帮我解决这个问题吗?我在这个问题上花了两天时间。提前致谢。
【问题讨论】:
-
请说明你的视图层次结构..你能放一些截图吗??
-
是的,伙计。我会编辑我的问题。谢谢。
-
好吧..希望一些图片能清楚你的问题
-
@R.A 我编辑了我的问题。如果您需要更多信息,请查看并告诉我。谢谢。寻找您的答案。
标签: iphone ios uilabel uitextview uimenucontroller