Ok, so I have a normal viewController
that has a UIScrollView
in it that gives details about distilleries. What I wanted to do was have a list of spirits that are distilled at the distillery that they are reading about. So I attempted to implement a UITableView
inside of my UIScrollView
, and after hooking everything up and writing all the delegate and datasource methods I come to find out that a UITableView
will not work inside of a UIScrollView
. So does anybody have any ideas as to what kind of User Interface Object I can use to accomplish something like a UITableView's dynamic characteristics? I don't want to use a UITextView
because it just looks cheap and unstructured. I need something that can dynamically change the number of items shown because not all distilleries will have the same amount of spirits distilled there.
好的,所以我有一个普通的viewController,里面有一个UIScrollView,它提供了有关酿酒厂的详细信息。我想要做的是列出他们正在阅读的酿酒厂蒸馏的烈酒。所以我试图在我的UIScrollView中实现一个UITableView,在连接所有代码和数据源方法后,我发现UITableView不能在UIScrollView中工作。那么有没有人对我可以用什么样的用户界面对象来实现UITableView的动态特性这样的想法?我不想使用UITextView,因为它看起来很便宜且非结构化。我需要能够动态改变所显示物品数量的东西,因为不是所有的酿酒厂都会有相同数量的蒸馏物。
1 个解决方案
#1
0
If you are implementing a UITableView
, there is no need to create a UIScrollView. As a UITableView will automatically increase its size and behave like a scrollable view whenever the content size is larger than the screen.
如果要实现UITableView,则无需创建UIScrollView。当内容大小大于屏幕时,UITableView将自动增加其大小并且表现得像可滚动视图。
#1
0
If you are implementing a UITableView
, there is no need to create a UIScrollView. As a UITableView will automatically increase its size and behave like a scrollable view whenever the content size is larger than the screen.
如果要实现UITableView,则无需创建UIScrollView。当内容大小大于屏幕时,UITableView将自动增加其大小并且表现得像可滚动视图。