仅横向 iOS 应用程序无法正确显示(与 shouldAutorotateToInterfaceOrientation 无关)

发布于 2024-12-21 00:59:06 字数 661 浏览 3 评论 0原文

首先,它是这样的,最上面的一个是我在 NIB 文件中布置的内容,第二个是它的显示方式:

first one

我不确定为什么背景会偏移,以及为什么我的图像不受包含它们的 UIImageView 的大小限制。有人知道发生了什么事吗?我认为我不需要重新构建控件、标签等,因为它们出现在正确的位置。这会是一个自动调整大小的问题吗?我浏览了所有 NIB 并取消选中了每个视图的 Autoresize Subview,然后浏览了每个视图中的所有图像并取消选中了 Autoresize Subview,这似乎调整了图像的大小因此它们更小,但仍然没有超出包含它们的 UIImageViews 的边界和大小限制。

有人知道发生了什么事吗?


更新


以下是取消选中所有 Autoresize Subview 复选框后应用程序现在的外观图像:

取消选中后

滑块也不应该距离图像那么近...

First off, here's what it looks like, the top one is what I have laid out in my NIB file and the second one is how it's displayed:

second one

I am not sure why the background is offset and why my images are not constrained to the size of the UIImageView that contains them. Does anyone have an idea of what's going on? I don't think I would need to reframe the controls, labels, etc. since those appear in the correct location. Would this be an autosizing issue? I went through all of the NIB's and unchecked Autoresize Subview for each one and then went through all of the images in each view and unchecked Autoresize Subview and that seemed to resize the images so they're smaller but still not staying in the bounds and sizing constraints of the UIImageViews that contain them.

Anyone have an idea of what's going on?


Update


Here's images of what the app looks like now after unchecking all of the Autoresize Subview check boxes:

after unchecking

The sliders shouldn't be that close to the images either...

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

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

发布评论

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

评论(1

沫雨熙 2024-12-28 00:59:06

好吧,为了安全起见,我最终删除了所有 ViewControllers 的所有 NIBheader/implementation 文件。我重新制作了所有视图,并为每个 ViewController 关闭了 Resize view from NIB,然后对我使用的每个图像进行了 Photoshop 处理,以确保它的大小是 < code>ImageViews 我正在使用。仍然不太确定发生了什么,但重做所有事情,更改图像大小并取消选中 Resize view from NIB 似乎可以解决问题。

Well I ended deleting all of the NIB's and header/implementation files for all of the ViewControllers, just to be safe. I remade all of the views and turned off Resize view from NIB for each ViewController, and then Photoshopped each image I was using to make sure that it was the size of the ImageViews I was using. Still not quite sure what happened but redoing everything, changing the image sizes and unchecking Resize view from NIB seemed to do the trick.

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