Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjusting Text View Inset #47

Closed
chuninator opened this issue Apr 2, 2019 · 2 comments
Closed

Adjusting Text View Inset #47

chuninator opened this issue Apr 2, 2019 · 2 comments

Comments

@chuninator
Copy link

Having an issue when wanting to adjust the inset of the text. I'd like to add a padding to the inside so the text starts further away from the edge of the text view. Currently the text indicator is too close to edge.

Current
Screen Shot 2019-04-01 at 9 48 35 PM

Trying to change the content inset gives this outcome:

messageField.textContainerInset = UIEdgeInsets(top: 0, left: 0.5, bottom: 0, right: 0)

Screen Shot 2019-04-01 at 9 43 02 PM

Ideas?

@KennethTsang
Copy link
Owner

KennethTsang commented Apr 4, 2019

Try either one of these:
messageField.textContainer.lineFragmentPadding = 10
messageField.textContainerInset.left = 10

@chuninator
Copy link
Author

Thank you @KennethTsang.
messageField.textContainer.lineFragmentPadding = 10 worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants