Reputation: 422
I have one long string :
NSString* string=@"I'm very long, you can't handle me in one small label, you should separate me and use 2 labels";
So i have two labels. I want to cut the head of the string to fit first label :
[string giveMeSomeTextSuitableForFirstLabel]
- as example;
result should be: @"I'm very long"
and the rest of the string should be: @", you can't handle me in one small label, you should separate me and use 2 labels";
I can't use 1 label instead of two, because there is one image on the corner that covers my first line.
Upvotes: 0
Views: 103
Reputation: 14886
This answer might be what you're looking for:
labelOne.lineBreakMode = NSLineBreakByWordWrapping;
Then calculate the size of the text chunk.
Upvotes: 2