【问题标题】:Setting content insets on UITextView using XIB使用 XIB 在 UITextView 上设置内容插入
【发布时间】:2019-01-08 08:24:45
【问题描述】:

我有一个UITableViewCell,其中包含一个UITextView

我想在这个文本视图上设置内边距,以便单元格内容每侧推入 10。

我知道我可以使用 textView.textContainerInset = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10) 在代码中做到这一点

在使用 XIB 文件时是否可以使用 IB?

【问题讨论】:

    标签: ios swift interface-builder uiedgeinsets


    【解决方案1】:

    您可以使用 Rect 类型设置 Key Path

    这应该可以实现您想要的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-09-04
      • 1970-01-01
      • 2012-06-11
      • 1970-01-01
      • 2014-03-28
      • 2011-07-14
      • 2013-10-24
      • 2017-03-12
      相关资源
      最近更新 更多