iPad 上的选项卡栏按钮和工具栏按钮不起作用

发布于 2024-10-07 09:28:59 字数 393 浏览 0 评论 0原文

我有一个应用程序一直在 iPhone 上运行,没有任何问题。我需要编译并测试它才能在 ipad 上运行。我已将项目部署选项“目标设备系列”更改为 iphone/ipad。进行此更改后,我已安装它并在 iPhone 上运行它,没有出现任何问题。

当我使用 ipad 模拟器或 ipad 设备运行/调试时,多个控件不再起作用。 主视图控制器有一个选项卡栏控制器。按选项卡栏上的按钮不会打开视图控制器。

在主视图上,我还可以通过按按钮(而不是选项卡栏按钮)打开不同的视图。 按下按钮会打开第二个视图。在第二个视图上有一个带有栏按钮项目的导航栏。该栏按钮项目也不起作用。按下它不会打开预期的视图。

iOS 部署目标设置为 iOS 4.2。 我还应该设置其他选项来启用 iPad 版应用程序吗?选项卡控制器是否需要更改代码才能工作?

I have an app that has been working on the iphone with no problems. I need to compile and test so it will run on the ipad. I've changed the Project Deployment option, Targeted Device Family, to iphone/ipad. I've installed it and run it on an iPhone with no problems after making this change.

When I run/debug using the ipad simulator or ipad device several controls no longer function.
The main view controller has a tab bar controller. Pressing the buttons on the tab bar doesn't open the view controllers.

On the main view I can also open a different view by pressing a button (not a tab bar button).
Pressing the button does open the second view. On the second view there is a navigation bar with a bar button item. That bar button item isn't functioning either. Pressing it doesn't open the expected view.

The iOS deployment target is set to iOS 4.2.
Are there other options I should set to enable the app for iPad? Are there coding changes required for the tab controller to work?

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

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

发布评论

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

评论(2

夏尔 2024-10-14 09:28:59

我遇到了类似的问题,但实际上没有找到任何资源来帮助解决该问题。然而,经过一番摆弄,我意识到触摸事件没有被发送到屏幕下部的任何内容。这表明 UIWindow 没有覆盖 iPad 的整个屏幕(尽管子视图似乎正确绘制)。构建器中应该有一个选项可以使窗口在加载时全屏显示。如果这不起作用,请尝试为 iPad 使用单独的 .xib 文件并正确设置窗口大小。这解决了我的问题。

I had a similar problem and found literally no resources to help resolve the issue. However, after some fiddling, I realized that touch events were not getting sent to anything in the lower portion of the screen. This suggests that the UIWindow is not covering the entire screen of the iPad (although the subviews appear to get drawn correctly). There should be an option in builder to make the window full screen on load. If this doesn't work try using a separate .xib file for the iPad and set the window size properly. This resolved my problem.

念三年u 2024-10-14 09:28:59

我最终找到了解决方案。我打开了原来的项目。
在“项目”菜单下,有一个用于升级 iPad 的当前项目的子菜单。
这为我解决了这个问题。我最初对代码做了一些更改
在我这样做之前。我必须回到原来的项目源然后
在应用程序正常工作之前,应用子菜单升级到 ipad 选项。

I eventually found a solution. I opened the original project.
Under the Projects Menu there is a submenu for Upgrade Current Project for iPad.
That fixed the issue for me. I originally made a couple of changes to the code
before I did this. I had to go back to the original project source and then
apply the submenu upgrade to ipad option before the app would work correctly.

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