1

I am using selectable UITextview to display my multiline message, i need to output my message in below style.

enter image description here

I can able to add numbering based on the newline character(\n) but the text position is starting from the beginning for remaining text, but i want "address" to be be start from "Verify" position

Suresh
  • 1,199
  • 2
  • 12
  • 36
  • If you now the space, you can maybe use `NSMutableParagraphStyle` with `NSAttributedString` or maybe use: http://stackoverflow.com/a/27876241/1801544 – Larme Feb 17 '15 at 10:17
  • i mean to say wrapped text should start from the position of "Verify" – Suresh Feb 17 '15 at 10:51
  • You can create a sub class of UIView which contains 2 separate labels, one for the numbering, the second for the text. – Zhang Feb 23 '15 at 07:46
  • Font style in second text have different font size, which leads to alignment issue – Suresh Feb 23 '15 at 08:32

1 Answers1

0

append three blank strings at initial of address this will solve your problem easy way.. :)

NSString *stringA = @"address";
NSString *stringAddress = [NSString stringWithFormat:@"   %@",stringA];
Nitin
  • 451
  • 5
  • 17
  • I guess this is not enough. It's working for a particular string, but this answer does not help to solve this problem in a more dynamic way. You have to found where to put these 3 spaces. – KIDdAe Feb 17 '15 at 10:15
  • address is wrapped text. We need every wrapped text to start from the position of Verify – Suresh Feb 17 '15 at 11:02