Search code examples
iosiphone-sdk-3.0uiactionsheetuiwindow

Wrong keyWindow size in iPhoneOS 3.x for universal iPad/iPhone app with Base SDK 4.2


I have an iPad/iPhone app which I need to make compatible down to iPhoneOS 3.x

When I try to show a UIActionSheet in iPhone 3.x, the screen becomes darker and the action sheet is shown somewhere off the screen. The reason is that the key UIWindow has the wrong frame of {0, 0, 768, 1024}. On later iOS versions the keyWindow has the expected size depending on the device.

Any ideas what the cause of this problem might be?

Thanks in advance...


Solution

  • Found the problem, posting here for future reference:

    Since the project was first created for iPad, mainWindow.xib had a size of 1024x768. Changed it to be 480x320 and now everything works, every iOS and every device.

    Hope this helps somebody!