滑动以删除 UITableView 中的节标题 [英] Swipe to Delete Section Header in UITableView

查看:50
本文介绍了滑动以删除 UITableView 中的节标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理扩展数据和 UITableView.我可以使用滑动来编辑和删除功能.我想知道是否可以仅滑动和删除部分标题.如果是,如何?

I am working on extended data and a UITableView. I am able to use swipe to edit and delete functions. I am wondering if it is possible to swipe and delete only section headers. If yes, how?

推荐答案

我不确定您想要实现什么.
但是,如果您想对节标题进行滑动删除,答案是,您可以这样做,但这需要某种编程.本质上,您必须添加一个节标题删除按钮"作为表格视图内容视图的子视图.
我建议阅读 Ray Wenderlichs 教程 „如何使用操作制作可滑动的表格视图单元格 - 不用担心滚动视图.这演示了如何向表格视图单元格添加滑动手势.
然而,相同的技术(例如控制滚动视图内的位置)可以应用于剖面视图标题.

I am not sure what you want to achieve.
But if you want to have a swipe delete for a section header, the answer is, you can do it, but it requires some kind of programming. Essentially, you had to add a „section header delete button" as a subview to the table views content view.
I suggest reading Ray Wenderlichs tutorial „How To Make A Swipeable Table View Cell With Actions – Without Going Nuts With Scroll Views". This demonstrates how you can add swipe gestures to a table view cell.
However the same techniques (e.g. controlling the position within the scroll view) can be applied to a section views header.

这篇关于滑动以删除 UITableView 中的节标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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