Iphone - How to align the text justified (newspaper like) in Interface Builder
-
24-09-2019 - |
문제
Is it possible? Align the text fully justified? Does anyone know any hack or Interface Builder plugin?
Thanks!
해결책
You cannot do it using UITextView, or any others. When I need justified text, I construct an html and show it in a UIWebView.
다른 팁
Here is the solution in my blog. I don't like use WebView. Also hyphenation word wrapper included.
From the definition of UITextAlignment it looks like you can't. Perhaps you can use the text drawing code to draw the text yourself, since you won't need interaction it shouldn't be too difficult.
You can do it using CoreText, yes, you will have a bit more of work, but it works like a charm. You can check this tutorial for that.
제휴하지 않습니다 StackOverflow