Justify-aligning text in a text view in swift
Asked Answered
B

1

7

It's a pretty trivial question I know, but I have to be able to justify-align the text in a text view using swift. It is an already existing text view on the storyboard which has been hooked up to an outlet, let's call it justifyTextView.

Can anybody give some code for this? I can't seem to find anything online about it.

Burnaby answered 23/4, 2015 at 16:19 Comment(2)
Have you tried thisLost
Please include what you have tried in your post.Tetragonal
N
33
label.textAlignment = NSTextAlignment.Justified
Notify answered 23/4, 2015 at 16:50 Comment(2)
the question relates to a UITextView and not a UILabelWayworn
@Wayworn True, but the effect is the same in this case. The textAlignment setter is also available on a UITextView.Quote

© 2022 - 2024 — McMap. All rights reserved.