tags:

views:

710

answers:

1

Hi all, Consider a regular form in iPhone:

1.There is a combobox.

2.There is a TextView under the combobox. (No overlaps)

3.When combobox is clicked,the options TableView opens and overlaps with the TextView.

4.The TableView is on top of the TextView.

5.When a cell in the TableView is touched, the TextView responds, the TableView doesn't get the event.

Now I see that the responder chain is from bottom-up. So TextView gets the event because its depth is lower than the TableView.

What is the best way to solve this problem?

A: 

Could your TextView be set as the delegate of the TableView?

If you are using event methods like didSelectRowAtIndexPath then your delegates may not be assigned properly. If you are using touch events, the tableview may not have multi-touch enabled.

nessence
Hmmm. TableView gets events because the cells not overlapping with the TextView can be clicked and "didSelectRowAtIndexPath" is triggered. I can't see a delegate problem. The delegate of the TableView is the ComboBox ViewController which conforms TableViewDelegate and TextFieldDelegate. I think I should concentrate on hitTest: calls.