0

Is it possible? Align the text fully justified? Does anyone know any hack or Interface Builder plugin?

Thanks!

Amure Pinho
  • 3
  • 1
  • 2

4 Answers4

3

Here is the solution in my blog. I don't like use WebView. Also hyphenation word wrapper included.

Didikot
  • 66
  • 1
2

You cannot do it using UITextView, or any others. When I need justified text, I construct an html and show it in a UIWebView.

EEE
  • 4,536
  • 3
  • 28
  • 34
  • Ok EEE, thanks a lot. I will try this but the problem is that Im extracting the data from an RSS feed and the extracted text comes with a lot of line breaks. I´ve tried to remove them using \n and \r but it doesnt work. Any ideas? – Amure Pinho Mar 04 '10 at 16:01
1

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.

Douglas
  • 36,802
  • 9
  • 76
  • 89
0

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.

Rui Peres
  • 25,741
  • 9
  • 87
  • 137