hi, UIlabel has numberOfLines property...it gives my string in 2 lines...but when i use UItextview ,i want to split no of lines based on length of text in UITextview,how can i do it?any help? UIlabel automatically splits...but UITextview did not do it?
A:
UITextView inherently allows multiple lines of text. You just separate your lines with the "/n" character and you're done.
luvieere
2009-11-30 09:05:10
hi,thanks..but i want to split no of lines based on length of UITextview,how can i do it?any help?
Mikhail Naimy
2009-11-30 09:15:45
Edit the question with more detail regarding what you would like to achieve and more people would be able to help you more efficiently.
luvieere
2009-11-30 09:26:20
A:
The lines should be separated by "\r"
Here's an example:
lblNeedSubscription = [[UILabel alloc] initWithFrame:frame];
[lblNeedSubscription setNumberOfLines:0]; // allows as many lines as needed
[lblNeedSubscription setText:@"To access content\ryou need to be a paid subscriber"];
hey68you
2010-07-07 06:07:26