iphone - 从推送转场返回后,Tableview 行保持选中状态

标签 iphone segue

我的 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/

相关文章:

ios - Tab Bar Item 是一个灰色方 block

ios - iPod 和 iPhone 之间的区别?在 APNS 中

ios - 将数组发送到下一个 View Controller

swift - 如何在保持导航栏存在的同时以模态方式呈现 View Controller 。 (对于设置 View Controller )

ios - 从嵌入的 UICollectionView(UIContainerView 内)导航到 UIViewController

ios - 推送 View Controller 无法设置动画

iphone - 如何使用文件名中带有空格的自定义字体文件

iphone - iPad/iPhone with Titanium 的启动 View

iphone - 创建协议(protocol)后访问 UIPageViewController 的委托(delegate)方法

iOS Swift 转场