UITabBar在iPad上没有反应 [英] UITabBar unresponsive on iPad

查看:99
本文介绍了UITabBar在iPad上没有反应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个已经过测试,提交和批准的现有iPhone项目,使用3.1.3 SDK进行编译。我已经采用这个项目并将其转换为通用iPad / iPhone应用程序,遵循Apple的指示(即让Xcode发挥其魔力)。

I have an existing iPhone project that has been tested, submitted, and approved, compiled with the 3.1.3 SDK. I've taken this project and converted it to a universal iPad/iPhone app, following Apple's instructions (i.e. letting Xcode do its magic).

此应用程序的 UITabBarController 作为其根视图控制器,内置在XIB中。在4.0 iPhone模拟器上运行时,它工作正常。当在3.2 iPad模拟器或设备本身上运行时,它有一个主要缺陷:UITabBar没有响应。我无法更改任何标签;点击UITabBar的任何部分似乎都没有注册。我可以点击当前选项卡视图控制器的视图没问题。

This app has a UITabBarController as its root view controller, built inside a XIB. When run on the 4.0 iPhone simulator, it works fine. When running on the 3.2 iPad Simulator or the device itself, it has one major flaw: the UITabBar is unresponsive. I can't change any of the tabs; taps on any part of the UITabBar don't seem to ever get registered. I can tap on the view of the current tab's view controller no problem.

由于 UITabBarController 是在一个内部创建的XIB,我也在XIB中创建它的选项卡(视图控制器)。如果我添加或减去选项卡,这似乎更新了UITabBar。但是,实际的标签都没有可供选择。

Since the UITabBarController is created inside a XIB, I also create its tabs (view controllers) inside the XIB as well. If I add or subtract tabs, that seems to update the UITabBar fine. But still, none of the actual tabs are tappable.

有没有人有任何想法?

推荐答案

事实证明Apple为Xcode将iPhone项目转换为通用iPhone / iPad项目的自动化选项没有为我的 UIWindow设置全屏启动标志实例,这意味着其硬编码的320x480帧之外的所有触摸都没有被发送到我的应用程序。

Turns out the automagic option that Apple put into Xcode to convert iPhone projects to universal iPhone/iPad projects didn't set the "Full Screen at Launch" flag for my UIWindow instance in my MainWindow-iPad.xib, which meant that all touches outside of its hard-coded 320x480 frame were not getting sent to my application.

这篇关于UITabBar在iPad上没有反应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆