UITabBar unresponsive on iPad

 ̄綄美尐妖づ 提交于 2019-12-20 01:39:32

问题


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).

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.

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.

Does anyone have any ideas?


回答1:


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.



来源:https://stackoverflow.com/questions/3295000/uitabbar-unresponsive-on-ipad

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!