TableView selection and Modal Views
I have a navigation controller that displays tableviews. When the user select a row a new tableview is displayed (new tableview controller pushed into the navigation stack). When the user touches the back button he can see the previous开发者_如何学编程 tableview and it selected row.
But now I put a info button in the right side of the navigation bar that loads a modal view controller to display some info. When I dismiss the modal view I return to the tableview, but now when I touch the back button the previous tableview doesn't have the selection.
How can I fix this issue? Thanks in advance!
Finally I found the solution:
In viewDidLoad:
self.clearsSelectionOnViewWillAppear = NO;
精彩评论