多个视图,这是更好的UITableView,UIView或UICollectionView [英] Multiple Views, Which is better UITableView, UIView or UICollectionView

查看:148
本文介绍了多个视图,这是更好的UITableView,UIView或UICollectionView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iPad应用程序:

在列表中显示自定义控件,控件如选择文件,图像编辑,视频编辑,广播组,复选框,带标题的文本框,面板,标签,签名。

Show custom controls in a list, controls are like "Select File", "Image Edit", "Video Edit", "Radio Group", "Checkbox", "Textbox with header", "Panel", "Tabs", "Signature".

现在我在 UITableView 中管理自定义控件。

Right now i manage custom controls in a UITableView.

每个控件都有属性(enble,hidden,editable,secure,color,font,text等)。可以通过从列表中选择控件来更改属性(点击 UITableView 的行),然后它将打开与特定控件相关的属性检查器视图。

Each controls has properties (enble, hidden, editable, secure, color, font, text etc.). Properties can be change by select control from list (tap on row of UITableView), And it will open a property inspector view related to specific control.

它完美地工作直到我对一行进行单一控制。现在我需要将这些控件分组并显示在一行中。

Its working perfectly till i have single control for a row. Now i have a requirement to group this controls and display in a single row.

连续管理一组控件很困难。哪种方法更好?

Its difficult to manage a group of controls in a row. Which is better approach to follow?


  1. 使用 UITableView 添加组控件在此,然后添加 UITableView 作为单元格

  1. Use UITableView add group of controls in this and then add UITableView as a cell

使用 UIView

UICollectionView


推荐答案

发布自我回答因为上面的方法现在已成功完成。测试了一个月的所有可能组合。

Posting self answer because the approach for above is now success fully working. Tested for all possible combination for a month.

我继续使用 UITableView 并在<$ c $中添加自定义视图c> UITableViewCell 所有事件都由代表在各自的视图中管理。

I continue with UITableView and add custom views in UITableViewCell all events are manage in respective views by delegates.

我必须管理控件组的复杂部分。为此我创建了一个 UITableView 并将其添加到主表中(这里我的要求是不要进行进一步的分组,因此获取 UITableView至关重要)。

The complex part in which I have to manage group of controls. For that i created one more UITableView and add it in main table (Here my requirement is not to go for further grouping so it is vital to take UITableView).

效果

经测试表现也是如此。对于下面的设备,iOS 7.0有时会显示滚动滞后。对于iOS 7.0及更高版本的设备,它可以顺利运行。

Tested for performance as well. For device below then iOS 7.0 some times show lag on scrolling. For iOS 7.0 and above devices it works smooth.

从其他人那里获得更多答案,如果有任何人已经出现这样的情况。

Appreciate more answers from other, If any one have gone situation like this.

这篇关于多个视图,这是更好的UITableView,UIView或UICollectionView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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