我的 View Controller 是一个UIViewController
。我已将 UITableView
添加到 UIView
中。当选择 TableView 行时,推送序列会触发一个新的 View Controller 。但是,当从新 View Controller 返回时,所选行保持选中状态。当我的第一个 Controller 是 UITableviewController
时,我没有遇到这个问题,但我必须将其更改为 UIViewController
,因为我想向我的 View 添加事件指示器。
我注意到的另一件事是,当我的第一个 Controller 是 UITableviewController
时,从新 View Controller 返回时不会调用 viewDidLoad
(但现在它被调用)。
最佳答案
添加...
[tableView deselectRowAtIndexPath:indexPath animated:YES];
在tableView:didSelectRowAtIndexPath:
关于iphone - 从推送转场返回后,Tableview 行保持选中状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13892913/