So, I have a basic UITableViewController that navigates to a UIViewController from the table's row objects.
so: UITableView.Row -> (selected) -> opens UIViewController View.
When I open the UIViewController view, I do a database call to look up some details for the object id that was selected in the parent TableViewController.
I had one issue however,...whenver I paged back to the previous view via the NavigationController, and selected a new row, the view was not updating the NavigationTitle.
I found that my original code was only loading once and setting the title of the navigation controller. It never refreshed after the first call to the view:
I then used the loadView overload instead of the viewDidLoad, and that worked:
Upon debugging however, I found that the 'loadView' method was executed 4 times everytime. While not a major call, just wondering why this is happening. I have stepped through the code line by line and this is what I find.
I get a bunch of these messages in the console: "Unable to disassemble objc_msgSend."
Furthermore, when looking at the stack trace, I see the following in my trace:
Essentially, all I'm looking for is a way to have the view refreshed with the new data after the data has been loaded. It's working, but I'm not sure this is what it's supposed to do!
so: UITableView.Row -> (selected) -> opens UIViewController View.
When I open the UIViewController view, I do a database call to look up some details for the object id that was selected in the parent TableViewController.
I had one issue however,...whenver I paged back to the previous view via the NavigationController, and selected a new row, the view was not updating the NavigationTitle.
I found that my original code was only loading once and setting the title of the navigation controller. It never refreshed after the first call to the view:
Code:
- (void)viewDidLoad
{
self.title = newname;
}
I then used the loadView overload instead of the viewDidLoad, and that worked:
Code:
- (void)loadView
{
self.title = newname;
}
Upon debugging however, I found that the 'loadView' method was executed 4 times everytime. While not a major call, just wondering why this is happening. I have stepped through the code line by line and this is what I find.
I get a bunch of these messages in the console: "Unable to disassemble objc_msgSend."
Furthermore, when looking at the stack trace, I see the following in my trace:
Code:
[UIViewController view]
[UINaviagationController -startTransition:fromViewController:toViewController:]
[UINavigationController pushViewController:transition:forceimmediate:]
[UINavigationController pushViewController:animated:]
[ViewController tableView:didSelectRowAtIndexPath:]
Essentially, all I'm looking for is a way to have the view refreshed with the new data after the data has been loaded. It's working, but I'm not sure this is what it's supposed to do!
Last edited by a moderator: