Giving an NSTextView some padding/a margin

前端 未结 4 2025
无人共我
无人共我 2021-02-02 00:08

How would I give a NSTextView some padding/a margin to the left? I know how you do it in a NSTextField (by subclassing NSTextFieldCell) but how do you do it in a NSTextView?

4条回答
  •  迷失自我
    2021-02-02 01:10

    Just to add an update to this. iOS7 adds a property to UITextView called textContainerInset. Calling setTextContainerInset will create margins inside the TextView for the content.

提交回复
热议问题