views:

45

answers:

1

Hi All,

I was wondering if anyone has tried it. I need to show a tooltip within a table view when the user selects a word in the row's text.

Can you please help me or suggest any way for this?

Thanks in advance!!!!!!

A: 

In each cell add a UIView (be it a UITextView, UIImageView or whatever, in fact you can add plenty of additional subviews to it). Say you call it "tooltipView".

Now when user selects text, all you have to do is position (move around) that view near the selection (or where the user touched the row) and set the relative information. To track the selection, you can simply override the - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event method of your cell class and keep checking the point variable and corresponding event.

Nick
oh!!! it is also one of the way for creating that question sender wants, But it has also be limitation that i commented before in which we want to keep an UIView behind the each word.If there is 100 word then you have to create 100 UIViews.
RRB