In a view of my program I have a button and with this button I open a subview; this subview is a view with a tableview. I want go to another view when I push a row of the tableview so I want to make this with a navigation controller; how can I do this?
Share
Your table view delegate will receive a
tableView:didSelectRowAtIndexPath:message when you click on one of the table’s rows.You can put there your code to create the UINavigationController and push on to it your new view.
This sample code (from another answer of mine on S.O.) shows how you can do that:
This should help you getting things on track.
One side note: you might think of having a navigation controller from the very start, this would make your UI more “well-behaved”, but this depends ultimately on your app requirements.