我可以在表视图中拖动部分,因为我可以使用行吗? [英] Can I drag sections in tableview as I can do it with rows?

查看:155
本文介绍了我可以在表视图中拖动部分,因为我可以使用行吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用

- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)sourceIndexPath 
  toIndexPath:(NSIndexPath *)destinationIndexPath{
 }

方法用于拖放行内并跨部分。我可以用段落执行拖动吗?

method for dragging and dropping rows within and across sections. Can I perform drags with sections as well?

推荐答案

可能在概念上(以及技术上)更简单地将级别一个表视图,其中每行对应于要重新排序的表的部分。也许你可以用重新排序按钮调用这个按钮,显示section-table-view,重新排序,然后在detail表视图上强加重新排序。
我想如果您尝试在单个表格中执行所有操作,您将会挫败自己和您的用户。我的2美分
-Mike

It's probably conceptually (as well as technically) simpler to step back a level to a table view where each row corresponds to the sections of the table you want to re-order. Maybe you could invoke this with a "re-order sections" button, show the section-table-view, re-order, then impose that re-ordering on the detail table view. I think if you try to do it all inside a single table, you're going to frustrate yourself and your users. My 2 cents. -Mike

这篇关于我可以在表视图中拖动部分,因为我可以使用行吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆