Pergunta

I know Apple don't recommend to Embed UITableView in UIScrollview.

So this is what I am trying to do:
I have a registration form with fields embedded in UIScrollview,
for some fields I create a drop menu by presenting UITableView, the problem is when the UITableView appears with my object the didSelectRowAtIndexPath not responding.

If there is another way it I will happy to hear, if not how can I fix it in the Current situation , thanks.

Foi útil?

Solução

Don't add the table as a subview of the scroll view, add it as a subview of the superview of the scroll view (and, consider adding it into a container view which detects touches outside the table to dismiss it from the screen without any selection being made).

If your 'root' view for the controller is the scroll view, change your view hierarchy to use a plain view as the root and have the scroll view as a subview of that.

You may also want to use bringSubviewToFront: to ensure that the presentation is correct.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top