I use an UILabel to show my text, in a multi-line and UILineBreakModeWordWrap mode, and the maximum width is 200.
For example, here is the text:
I really really want to underline first word and second word, could you help me?
And I want to underline "first word" and "second word".
If the text is shown in a single-line mode, with sizeWithFont method of NSString, I can easily calculate the position of "first word" and then override - (void)drawTextInRect:(CGRect)rect to draw the line.
But in multi-line mode, I don't know how to get the position. Do you have any idea?