可扩展的表格与UitableView?

发布于 2025-01-25 04:26:42 字数 135 浏览 1 评论 0原文

我可以实现3种单独的表单,但是它们的标题使单击时形式可折叠。

在网上搜索时,我看到了uitableview的扩展行。是否可以在表视图的扩展视图中添加自定义表单视图?还是我尝试另一种方法,其中有3个隐藏视图,这些视图在选择每个标题部分时会出现?

I haave to implement 3 seperate forms, but they have headers which make the forms collapsible when clicked.

When searching online I saw the expanding rows for UITableView. Is it possible to add a custom form view in the expanded view of the tableView? Or do I try another approach with 3 hidden views that appear when each of the header sections are selected?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

烟雨凡馨 2025-02-01 04:26:42

我总是在手机内使用UistackView。当用户单击“展开”按钮时,我会查看视图并致电tablewview.reloaddata()。这是我的方法

I always use UIStackView inside my cell. And when user click expand button, i unhide views and call tablewview.reloadData(). This is my approach

莫言歌 2025-02-01 04:26:42

您可以使用3个堆栈视图。每个堆栈视图将具有标题标签和一个桌面视图。默认情况下,所有表视图都是隐藏的,标签标签并未隐藏。将水龙头手势添加到标签上。每当用户敲击标签标签时,您都可以拆开相应的TableView。您可以给每个标签标签和TableView给标签,以便您可以识别哪个标签被敲击,例如用户用TAG 1点攻头标签,您将使用TAG 1 Undide TableView。

You can use 3 stack views. Each stack view will have a heading label and a tableview inside it. By default all the tableviews are hidden and heading label are not hidden. Add a tap gesture to heading labels. Whenever user taps a heading label you can unhide the respective tableview. You can give tags to each heading label and tableview so you can identify which heading label is tapped, like if a user tapped heading label with tag 1, you will unhide the tableview with tag 1.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文