【问题标题】:How to jump to next row in detailView?如何在详细视图中跳转到下一行?
【发布时间】:2013-10-14 08:35:03
【问题描述】:

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

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

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


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

【问题讨论】:

    标签: ios xcode tableview master-detail


    【解决方案1】:

    scrollToRowAtIndexPath:atScrollPosition:animated:

    上面的方法可以在detail view的table view上调用,让它滚动到新行

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-30
      • 2014-05-05
      • 2018-07-14
      • 2015-07-23
      • 1970-01-01
      相关资源
      最近更新 更多