1
votes

Here's what I've created : [TabBarController]->[NavigationController]->[TableView]. I want to create an new [TableView] that will be pushed when I select a cell in the first UITableView. I tried with a pushViewController method. It works but I can't go back to my first TableView (there is no navigation bar). I also tried with a navigationBar between the 2 UITableView but I received the message "cannot push to a navigation bar". Can anyone guide me ? Thanks

[self.navigationController pushViewController:TableView2 animated:YES]; 

(self is my first UITableView)

1
Please a code where you call pushViewControllersha
[self.navigationController pushViewController:TableView2 animated:YES]; (self is my first TableView)Zoomzoom
You're mixing views and view controllers. Is tableView2 your view controller?sha
I have 2 views (TableView1 et TableView2) et 2 view controllers(navigation controller and tab bar controller)Zoomzoom
You need to have UITableViewController containing your TableView2. And push that controller into Navigation controller and not the view itself.sha

1 Answers

0
votes

UINavigationControllershould exist before firstTableViewController. When the cell on firstTableViewis pressed, it should send an event toTableViewmaking use of delegate. After, push the secondTableViewController. After that, you can pop back to firstTableViewControllerfrom the secondTableViewController`.