开发者

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜