通过拖动对iPhone上的UITableView部分进行重新排序(如对行进行重新排序) [英] Reordering UITableView sections on the iPhone by dragging (like reordering rows)

查看:196
本文介绍了通过拖动对iPhone上的UITableView部分进行重新排序(如对行进行重新排序)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SDK中当前是否有任何东西可以对tableView部分进行重新排序?像这样,将整个部分移到相邻部分的下方还是上方?这可以通过单独的UITableViewCells来实现。

Is there anything currently in the SDK that allows for re-ordering of tableView sections? As in, move the entire section below or above an adjacent section? This is plausible with individual UITableViewCells. Haven't seen it done for sections though.

推荐答案

也许不理想,但相当简单,因此值得考虑:
添加区域标题的向上/向下按钮。在第一个上向下,在最后一个上向上,所有其他上向下。然后以编程方式重新排序表格,以响应按钮的按下。向上将部分向上移动一格,向下将部分向下移动一格。
马丁

Maybe not ideal but fairly simple so worth considering: Add Up/Down buttons to your section headers. Down on the first, Up on the last and Up and Down on all the others. Then respond to the button presses by programmatically re-ordering the table. Up moves the section up one and Down moves the section down one. Martin

这篇关于通过拖动对iPhone上的UITableView部分进行重新排序(如对行进行重新排序)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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