Samui
Samui

Reputation: 1384

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!

Upvotes: 0

Views: 111

Answers (1)

Samui
Samui

Reputation: 1384

Finally I found the solution:

In viewDidLoad:

self.clearsSelectionOnViewWillAppear = NO;

Upvotes: 0

Related Questions