简体   繁体   English

在iOS中滚动屏幕

[英]Scroll screen in IOS

I have been trying to find a way to use a background image so that it is larger than the device screen size, IE: the user can scroll from top to bottom and side to side to view the entire image. 我一直在尝试找到一种使用背景图像的方法,以使其大于设备屏幕尺寸IE:用户可以从上到下,从一侧到另一侧滚动查看整个图像。

This is something I'm looking at in gaming. 这是我在游戏中正在寻找的东西。 I just haven't found any way to do this, I know its because I'm looking in the wrong place or asking the question in an incorrect manner, so any help would be appreciated. 我只是没有找到任何方法可以这样做,我知道它是因为我在错误的位置寻找或以错误的方式提出问题,因此我们将不胜感激。

对于这个问题,您可以使用scrollView并在其中插入一个内容视图,并给出3倍屏幕宽度/高度的信息,请参见此处的演示ScrollAnyway

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM