0

I have UITableView with a header, and the view inside it. It is like a popup menu, when it is not hidden - it overlaps the bottom cells. But the problem I faced - this view is not responding to any touch events and I do not know why.

How can I make such view clickable? I tried to change z-position of a view, and the whole header, but it is not worked. Preventing your answers - userInteractionEnable = true. Thanks.

enter image description here

WorieN
  • 1,276
  • 1
  • 11
  • 30
  • 2
    It doesn't respond to touch events because what you see it's outside the bounds of the header view. Everything that's outside the bounds of the parent view won't be tappable. To understand better, just set clipToBounds = true on the header view (the view that contains the "dropdown") and you'll notice that the dropdown is clipped and what you will see after it's actually the area that can be tapped. – danypata Jun 15 '18 at 14:32
  • Ok, but is there any way to make such menu in the header? How to implement it correctly? – WorieN Jun 15 '18 at 15:48
  • Yes there is, but the menu won't be added in the actual header. You would show it in a view on top of the table and compute the exact position of the view. – danypata Jun 15 '18 at 19:35

0 Answers0