I have a navController and tableViewController set up such that selecting a table row will push a detail view on the navController's stack and display detailed information about the row selected. In the detail view I use a single UILabel to display the info, and I set the value of the label's text property in viewDidLoad of the detail view controller.
The first time I select a row, the detail view comes up with the expected text. When I go back to the table view and select a different row, the detail view comes up with the same text as the first time.
I have seen some code samples where the detail view controller is released and then set to nil after being pushed on the navController's stack. If I add that to my code, the problem goes away, but I don't understand why.
Can someone explain to me what's going on here?
Thanks!