1

How to do a NSString both right and left justified text?

thx

I tried @"%-10@" and @"+10@" ... not working

Woof
  • 689
  • 1
  • 5
  • 9

2 Answers2

2

You can't. An NSString is just a sequence of characters. It doesn't know anything about justification, or anything else related to formatting.

yuji
  • 16,645
  • 4
  • 62
  • 63
0

Fully justified text is not supported by UILabel/UITextView

But...

This should solve your problem. Sizing a UILabel to fit?

Community
  • 1
  • 1
Theis Egeberg
  • 2,463
  • 19
  • 29