【问题标题】:How can I make a UITextView not selectable? [duplicate]如何使 UITextView 不可选? [复制]
【发布时间】:2011-02-13 04:07:07
【问题描述】:

可能重复:
How disable Copy, Cut, Select, Select All in UITextView

我在 UITextView 中有一些文本。我不希望它是可选的。我该怎么做?

【问题讨论】:

    标签: iphone objective-c cocoa-touch ipad


    【解决方案1】:

    使用 myTextView.editable = NO;

    【讨论】:

    • 或(iOS7 起)textview.selectable = NO
    【解决方案2】:

    您需要的 UITextView 的哪些功能在 UIScrollView 中的 UILabel 中不可用?似乎您唯一会失去的就是自动设置 contentSize,这很容易手动完成。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-02-26
      • 1970-01-01
      • 2010-11-28
      • 2012-09-06
      • 1970-01-01
      • 2011-11-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多