如何使用界面构建器在UITableView中设置水平滚动? [英] how to set horizontal scrolling in UITableView by using interface builder?

查看:98
本文介绍了如何使用界面构建器在UITableView中设置水平滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序中有UITableView有2列。我可以阅读第1列和第2列的一半。我的问题是 -
我们可以通过使用uitableview中的界面构建器添加水平滚动,这样我就可以阅读第2列对于表中的所有单元格?

I have UITableView in my app with 2 columns.I can read column 1 and half of column 2.My questions are- can we add horizontal scroll by use of interface builder in uitableview so i can read column 2 for all cells in table?

我们是否应该为此添加一些代码,或者只能使用界面构建器添加一些代码?

should we have to add some code for that too or its only possible with interface builder?

推荐答案

首先, UITableView 中的行不会在 UITableView中自动滚动
我的解决方案(我知道有人会提供更好的东西)
是使用 UIScrollView 然后在里面添加的UITableView
这个 UIScrollView 的大小与你的 UITableView 相同,但是 UIScrollView contentSize属性将具有相同的高度,但它具有更大的宽度。

First, the row in the UITableView doesn't scrolls itself inside the UITableView. My solution (I know someone will come out with something better) Is to use an UIScrollView and then inside add the UITableView. This UIScrollView will have the same size that your UITableView have now, but the UIScrollView contentSize property will have the same height but it would have a greater width.

这篇关于如何使用界面构建器在UITableView中设置水平滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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