【问题标题】:Why does UITextView set clipsToBounds to true by default?为什么 UITextView 默认将 clipsToBounds 设置为 true?
【发布时间】:2019-01-06 04:21:39
【问题描述】:

对于UITextView,为什么clipsToBounds默认设置为true

如果我想向我的UITextView 添加一个其框架超出我的UITextView 可见范围的子视图,是否可以将其设置为false?我已将isScrollEnabled 设置为false

【问题讨论】:

    标签: ios uiscrollview uikit uitextview


    【解决方案1】:

    对于UIScrollViewclipsToBounds 默认设置为true。我认为这是因为它的子视图在滚动超出其范围时会消失。我猜UITextView 只是继承了这个设置。

    我认为没关系,但我建议将子视图添加到您的 UITextView 的父视图中。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-08-14
      • 2021-03-17
      • 2014-02-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-05-26
      相关资源
      最近更新 更多