I have a similar problem described in this thread: Capturing strokes on a preview outside of its supervisor using hitTest: withEvent:
Situation
We are developing an application in Xamarin iOS. We have a custom view to create our own autocomplete input field containing the UiTextField and UiTableView below to show the results.
To achieve better modularity, we have another custom view called LabeledContainer. Inside this, I can set a shortcut and add content to the bottom view, which is autocomplete in this case.
AutoComplete LabeledContainer
+---------------+ +---------------+
| UiView | | UiView |
|+-------------+| |+-------------+|
|| UiTextField || || UiLabel ||
|+-------------+| |+-------------+|
|+-------------+| |+-------------+|
|| UiTableView || || UiView ||
|+-------------+| |+-------------+|
+---------------+ +---------------+
The following gets rendered:
MAINVIEW
+------------------------------+
| |
| |
| |
| |
|+----------------------------+|
|| LabeledContainer ||
||+--------------------------+||
||| Label |||
||+--------------------------+||
||+--------------------------+||
||| Content |||
|||+------------------------+|||
|||| AutoComplete ||||
|||+------------------------+|||
||+--------------------------+||
|+----------------------------+|
| |
| |
| |
| |
+------------------------------+
Problem
"hitarea", autoComplete (tableView) . , . , hitArea.
public override bool PointInside(CGPoint point, UIEvent uievent)
{
var bounds = Bounds;
bounds.Height += DROPDOWN.Bounds.Height;
return bounds.Contains(point);
}
, autoComplete subChild mainView, PointInside . autoComplete labeledContainer, + , PointsInside . , , ? PointsInside , ? labeledContainer autoComplete , .
PointsInside labeledContainer, , labeledContainer PointsInside .