Pregunta

I have a situation like this:

enter image description here

As you can see, the first table view shows when I go to the relevant tab.

But the second table view should be showed like this:

When I press yellow button in the first table view [inside a cell] , it prompt an alert view. When I press ok from the alert it should show second table view.

So far I could implement up to the alert dialog.

Here is the problem:

When I press ok from the alert view, it only shows empty table view. I have successfully retrieved required data that should display in the second table view.

And the customised cell class and the table view class are quite similar to the first table view scenario.

But I can not load my desired table view after touch the ok button in the alert view.

as i think , the problem is i do not have segue with this.. but i don't have idea how to give a segue for this particular case which is between alert view and the table view.

Please guide me to solve this issue.

Thank you.

¿Fue útil?

Solución

So the solution:
• Create a segue between the two UIViewControllers.
• In your UIAlerView delegate method alertView:clickedButtonAtIndex:, according to the button index you want, do performSegueWithIdentifier:sender of your previously created segue.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top