我有一个类似Notes的应用程序:uitableviewcontroller通过将各个注释插入导航堆栈来显示它们。然后,我决定使用ios7的“后退”按钮和一个随附的平移手势识别器。
我唯一的修改是在按下detail-view-controller之前,通过将from-controller的navigationItem标题设置为空字符串来从按钮中删除文本,如https://stackoverflow.com/questions/18870128/ios-7-navigation-bar-custom-back-button-without-title所建议
该按钮本身可以正常工作,但是当我通过平移手势从便笺返回到便笺表格 View 时,不会清除表格 View 选择!我刚刚转换的笔记行仍显示为选定的那一行。
有什么想法在这里可能出什么问题吗?
我已经检查了标准的Notes应用程序,它的工作原理很吸引人。
最佳答案
这个答案确实帮助了我:https://stackoverflow.com/questions/897071/iphone-uitableview-cells-stay-selected
- (void) viewWillAppear:(BOOL)animated {
[self.tableView deselectRowAtIndexPath:[self.tableView indexPathForSelectedRow] animated:animated];
[super viewWillAppear:animated];
}
关于uinavigationcontroller - ios7在导航堆栈中返回的新平移手势不会清除tableview选择,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19036645/