1

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

thx

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

Woof
  • 699
  • 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,695
  • 4
  • 63
  • 64
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,556
  • 21
  • 30