[英]How to make the screen adapt when you use a freeform simulated size in Xcode?
I am making an app and I have a UIScroll view in my viewController. 我正在制作一个应用程序,并且在viewController中有一个UIScroll视图。 I have set the simulated size to freeform and the height to 2000 and width to 375. When I run my app on the Iphone 7 There are no problems. 我已将模拟大小设置为自由格式,将高度设置为2000,将宽度设置为375。在Iphone 7上运行我的应用程序时,没有问题。 But when I try to run the app on the iphone 7plus the screen does not adapt and i get these white bars on the right side because my contents width is only 375 pixels. 但是,当我尝试在iphone 7plus上运行该应用程序时,屏幕无法适应,并且由于我的内容宽度仅为375像素,所以在右侧显示了这些白色条。 So how can I make my screen to automatically go bigger when I use a bigger device? 那么,当我使用更大的设备时,如何使屏幕自动变大?
如果尚未完成,则应在UIScrollView
添加约束(后缀,前导,顶部空间,底部空间),以将其固定到超级视图范围。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.