I am trying to learn iPhone development as I’ve read many others on here are also saying. And Ive searched through about 20 pages of previous threads but couldn’t quite find one that is what I need. I have a TableViewController as my root view that is inside a NavigationController. I have a grouped table with 2 cells inside the TableViewController and was wanting the text of which ever cell was selected to become the title of the next view’s NavigationBar. I am using Xcode 4.3 and storyboards. Any help would be appreciated!!
Share
In the
tableview:didSelectRowAtIndexPath:method, I assume that you are creating and pushing your next view controller. You also must be having an Array (or some data source) which populates the text in the Tableview. So get the current cell’s text by using indexpath.row. Set this text to:So when you push this view controller, it’ll have the title of the cell selected.