1

Is there any way to 'justify' the text in a UITextView in an iOS app?

petert
  • 6,672
  • 3
  • 38
  • 46
neoJacob
  • 177
  • 1
  • 12
  • Not out-of-the-box. See duplicate post: http://stackoverflow.com/questions/402339/getting-justified-text-in-uitextfield. – petert Jul 26 '11 at 07:57

1 Answers1

1

No that's not possible in a UITextView. There are two ways to achieve this.

  1. Write a method that adusts the text with spaces in a way that it fits the textview exactely
  2. Use CATextLayer. That class has a property to set the alignment to Justifiy.

I hope this helps you out.

Sandro Meier

Sandro Meier
  • 3,071
  • 2
  • 32
  • 47