Xcode 水平滚动视图

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9915591/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 23:49:13  来源:igfitidea点击:

Xcode horizontal ScrollView

xcodeuiscrollviewuiimageview

提问by RobRoyRyan

I am trying to make a horizontal ScrollView. I was able to set the size the scrollView.

我正在尝试制作水平ScrollView. 我能够设置滚动视图的大小。

However, I was trying to make views, but I tried to do it with Storyboard (which I think is really dumb, since I can't really see the box beyond). I am trying to make 5 views that each has 2 label and 1 UIImageViewwith specific size, but how do I generate views programmatically?

然而,我试图提出意见,但我试图用 Storyboard 来做(我认为这真的很愚蠢,因为我真的看不到外面的框)。我正在尝试制作 5 个视图,每个视图都有 2 个标签和 1 个UIImageView具有特定尺寸的视图,但是如何以编程方式生成视图?

回答by mattjgalloway

You may want to look at this tutorial.

你可能想看看这个教程

It's a bit of a vague question to answer directly. I suggest reading that tutorial and then coming back with any concrete questions you have.

直接回答这个问题有点模糊。我建议您阅读该教程,然后再回来提出您遇到的任何具体问题。