除了iPhone 11以外的其他任何iPhone模拟器的缩放屏幕11

发布于 2025-02-09 00:08:48 字数 568 浏览 2 评论 0原文

我正在尝试测试和完善我最近正在处理的应用程序,我发现它看起来像iPhone 11模拟器一样,但是在其他任何iPhone(较小/较大的屏幕)中,它似乎都可以放大屏幕ContentView中的每个项目都有一个针对Supperiew = 20的领先/尾随约束。它一直放大直到物品出现并直到其水平端(标签,Textfields,...)。

它似乎可以放大,而不是切割,因为除了上向下的滚动栏外,现在我能够左右滚动。

这是UiviewController的螺栓饰面视图的堆栈。 i.sstatic.net/jkutc.png“ alt =“在此处输入图像说明”>

contentView的约束对supperiew = -70 / top to supperiew = 0 / present and prade and to to supperiew = 0。xcode

。使用的版本:13.4.1

I am trying to test and refine the application I've been working on lately and I found that it looks as it should with the iPhone 11 simulator, but with any other iPhone (smaller/bigger screen) it seems to zoom the screen even if every item from the ContentView has a Leading/Trailing constraint to Superview = 20. It's zooming right until the appearance of the items and right until their horizontal end (labels, textfields, ...).

It seems to zoom, not cut, because besides the up-down scroll bar, now I am able to scroll left-right.

Here is the stack of the embedded views of the UIViewController with their constraints.enter image description here

The constraints for ContentView are Bottom to Superview = -70 / Top to Superview = 0 / Leading and Trailing to Superview = 0.

Xcode version used: 13.4.1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

荒芜了季节 2025-02-16 00:08:48

@donmag的 为我工作:

您应该限制contentView top/pradion/taff/tox to scroll视图的内容布局指南 ...,并将其宽度限制为滚动视图的框架布局指南。现在,我假设内容视图的子视图正在确定其宽度。

@DonMag's solution in the comments worked for me:

You should constrain your ContentView top/leading/trailing/bottom to the scroll view's Content Layout Guide... and constrain its width to the scroll view's Frame Layout Guide. Right now, I'm assuming the content view's subviews are determining its width.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文