通过拖动对iPhone上的UITableView部分进行重新排序(如对行进行重新排序)

编程入门 行业动态 更新时间:2024-10-24 02:27:42
本文介绍了通过拖动对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部分进行重新排序(如对行进行重新排序)

本文发布于:2023-06-07 22:03:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/568570.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:拖动   如对   iPhone   UITableView

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!