如何创建可以水平滚动的UITableView? [英] How to create a UITableView that can scroll horizontally?

查看:72
本文介绍了如何创建可以水平滚动的UITableView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个verticalTableView,它在每个verticalTableViewCell中都有一个horizo​​ntalTableView,可以水平滚动(与'Pulse'应用程序相同的概念)。我已经找到了一些教程(下面两个例子),但它们都在XIB的时代。任何人都可以解释如何做/给我一个关于如何用故事板做同样的教程的链接吗?

I am trying to create a verticalTableView that has a horizontalTableView inside each verticalTableViewCell that can scroll horizontally (same concept as the 'Pulse' app). And I have found a number of tutorials (two examples below), but they are all in the days of XIBs. Can anyone explain how to do it/give me a link to a tutorial on how to do the same with a Storyboard instead?

第一个教程

Second Tutorial

更新:此后我发现了另一个关于SO的问题那个问这个问题的同一个人回答了这个问题。这个人已经设法使用UITableViewCell类来实现tableView的协议,问题是如何?包含动态tableView的tableView是静态的吗?

Update: I have since found another question on SO that was answered by the same person that asked the question. This person has managed to implement the protocols for a tableView using a UITableViewCell class, question is how? And does it matter that the tableView that contains the dynamic tableView is static?

静态UITableViewCell中的动态UITableView

推荐答案

感谢@christoph,我终于想通了出来。请参阅他的问题中的示例代码。

Thanks to @christoph, I finally figured it out. See sample code in his question.

静态UITableViewCell中的动态UITableView

这篇关于如何创建可以水平滚动的UITableView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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