iPad 应用程序不保留其尺寸 - 恢复为 iPhone 尺寸

发布于 2025-01-06 11:58:22 字数 502 浏览 4 评论 0原文

我需要一些帮助, 我创建了一个 iPhone 应用程序,它运行得很好,我使用 iPhone 应用程序中的 .h 和 .m 文件为 iPad 制作了类似的应用程序,我创建了新的 .xib 文件,以便该格式适合 iPad 尺寸,并且当我运行时模拟效果很好,但如果我停止它并使用模拟器本身上的 iPad 按钮(底部中间按钮,我认为是 HOME)再次启动它,我的所有尺寸都会更改为 iPhone 尺寸的屏幕。

概括。

  1. .xib 文件是为 iPad 尺寸创建的。
  2. 我没有使用故事板,我有单独的 .xib 文件
  3. 当我第一次运行该应用程序时,它工作得很好。
  4. 如果我停止它并使用 iPad 模拟中的按钮再次启动它,尺寸就会更改为 iPhone 尺寸。
  5. 我没有iPad,所以无法在现实生活中查看,只能通过模拟器进行操作。

有人可以让我知道如何修复它吗?我的代码是否做错了什么? 我需要更改一些设置吗?

非常感谢您的帮助,我正在尝试寻找解决方案。

I need some help,
I created an iPhone App and it works great, I have made similar app for the iPad using my .h and .m files from my iPhone app, I created new .xib files for so the format fits the iPad dimensions and when I run in the simulation it stats alright but if I stop it and start it again using the iPad button (bottom middle button, I think is the HOME)on the simulator itself all my dimensions change to an iPhone size screen.

Summary.

  1. The .xib files where created for the iPad dimensions.
  2. I am not using storyboard, I have individual .xib files
  3. When I fist run the app it works perfectly fine.
  4. If I stop it and start it again using the button inside the iPad simulation, the dimension change to an iPhone size.
  5. I do not have an iPad, so I can not check it out in real life I can only go by what the simulator does.

Can some please let me know how fix it, am I doing something wrong with my code?
Do I have to change some settings?

Your help is very much appreciated, I am going bald trying to find a solution.

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

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

发布评论

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

评论(1

挽手叙旧 2025-01-13 11:58:22

iOS模拟器包括您创建的所有应用程序。如果您创建了名为 MyApp 的 iPhone 应用程序和另一个同名的 iPad 应用程序,则模拟器将显示两个应用程序。例如,在 iPhone 模拟器上运行 iPad 应用程序可能会导致意外行为。检查按下主页按钮时运行的应用程序。

也尝试重置你的模拟器。

iOS simulator includes all applications created by you. And if you have created iPhone app with name MyApp and another iPad app with the same name then simulator will show two app. And running iPad app on iPhone, for example, simulator can lead to unexpected behavior. Check what app you run when you push Home button.

Try also to reset you simulator.

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