tags:

views:

46

answers:

1

I have an interesting UI where a table view contains some lines of text. There are certain words in each line that I need to highlight and those words can be selected to render some tooltip.

I thought of using labels for these words so I can highlight them and also capture any touch events. But I couldn't find a way of achieving a flow layout.

Is there a better approach to do this?

Thanks in advance for the help!

A: 

A UIWebView would certainly handle the layout problem, but may cause other performance issues, especially if you're putting it in a table view.

You might also look at the NSString (UIStringDrawing) methods, which are helpful for measuring and drawing text. They're quite powerful actually, allowing you to specify size constraints and line break modes.

Brian
Thanks. I will try it out. Is there a sample app that I can refer to?
Mansi
@Mansi, sorry, none that I'm aware of
Brian
Go for three20 library!
Mansi