仅横向 iOS 应用程序无法正确显示(与 shouldAutorotateToInterfaceOrientation 无关)
首先,它是这样的,最上面的一个是我在 NIB 文件中布置的内容,第二个是它的显示方式:
我不确定为什么背景会偏移,以及为什么我的图像不受包含它们的 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:
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:
The sliders shouldn't be that close to the images either...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,为了安全起见,我最终删除了所有
ViewControllers
的所有NIB
和header/implementation
文件。我重新制作了所有视图,并为每个ViewController
关闭了Resize view from NIB
,然后对我使用的每个图像进行了 Photoshop 处理,以确保它的大小是 < code>ImageViews 我正在使用。仍然不太确定发生了什么,但重做所有事情,更改图像大小并取消选中Resize view from NIB
似乎可以解决问题。Well I ended deleting all of the
NIB's
andheader/implementation
files for all of theViewControllers
, just to be safe. I remade all of the views and turned offResize view from NIB
for eachViewController
, and then Photoshopped each image I was using to make sure that it was the size of theImageViews
I was using. Still not quite sure what happened but redoing everything, changing the image sizes and uncheckingResize view from NIB
seemed to do the trick.