Greetings Programs!
In my first tab, I have a Sites tableview and on the first time I select a cell, it switches to the second tab (categories) and displays the data from the web service using the custom cell as expected.
However, if I switch back to the first tab and select another (or same) site, it switches to the second tab as expected but this time the cells are now a basic cell with only the title.
I know there was this thread http://sensiblecocoa...c/360-poptoroot regarding a pop-to-root feature to be implemented in 2.1 but not sure where that lead to.
Am I popping correctly for STV? If not, how should I be doing it?
if let viewControllers = self.tabBarController?.viewControllers { // Get the Forum tab bar's navigation controller. var navigationController = viewControllers[1] as UINavigationController navigationController.tabBarItem.enabled = true // Get the SCTableViewController. var view = navigationController.viewControllers[0] as CategoryViewController // Set the flag to reloadData. view.reloadData = true; // Set the selected site object containing the web service url used to replace the webServiceDef.baseUrl. view.currentSite = self.site // Switch to the second tab. self.tabBarController?.selectedIndex = 1 // Go back to the main tableviewcontroller (Categories) of the tab. navigationController.popToRootViewControllerAnimated(false) }
Wg