Replies: 2 comments
-
|
Fixed it by setting vertical padding on the scrollview let padding: CGFloat = 8
textView.textContainer.lineFragmentPadding = padding
scrollView.automaticallyAdjustsContentInsets = false
scrollView.contentInsets = NSEdgeInsets(top: padding, left: 0, bottom: padding, right: 0)
scrollView.scrollerInsets = NSEdgeInsets(top: -padding, left: 0, bottom: -padding, right: 0) |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
yes! the scrollView inset (or other parent view inset) is the way to go - if you use scrollview. I always find the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
With NSTextView, I can easily add padding using
textContainerInset:But STTextView doesn't have this property. The only option I found is
lineFragmentPadding, which works, but only for horizontal padding:Is there any way to add vertical padding to STTextView?
The upper text field is based on NSTextView, and the bottom one uses STTextView.
Beta Was this translation helpful? Give feedback.
All reactions