开发者

TableView selection and Modal Views

开发者 https://www.devze.com 2023-03-25 12:10 出处:网络
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

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;
0

精彩评论

暂无评论...
验证码 换一张
取 消