ios - 如何跳转到详细 View 的下一行?

标签 ios xcode tableview master-detail

如何跳到 DetailViewController 中的下一行?就像在邮件应用程序中一样

我将 indexPath 从 MasterViewController 传递到 DetailViewController,然后我为下一行创建了一个新的 indexPath:

NSIndexPath * newIndexPath = [NSIndexPath  indexPathForRow:indexPath.row+1 inSection:indexPath.section];


我也找到了这个解决方案 How to jump to the next row in detailview ,但这只是描述,如何从MasterViewController跳转。

最佳答案

scrollToRowAtIndexPath:atScrollPosition:animated:

可以在详细信息 View 的表格 View 上调用上述方法,使其滚动到新行

如果您只想选择下一行..您可以使用索引路径显式调用 TableView didSelectRow 的委托(delegate)方法。

关于ios - 如何跳转到详细 View 的下一行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19230450/

相关文章:

ios - 如何以编程方式更改 UITableView 的类?

ios - 通过 userDefaults 在两个 View Controller 之间共享数据

ios - Xcode 6 与 Swift 超慢打字和自动完成

ios - 选择单元格后的事件指示器

ios - 第一个 TableView 单元格没有正确出队

ios - 我的 UIPageControl 没有显示?

ios5 - 商店工具包 - 获取不可续订订阅的到期日期

c++ - 使用 GLFW3 编译,链接器错误 'undefined reference'

ios - 加载TableData之前如何从CloudKit获取数据

ios - 在 SWTableViewCell 中,UtilityButtons 不响应 setTag 属性