iphone 5 simulator - Cannot click on bottom of screen?
Asked Answered
K

4

7

I'm trying to update an app to add support for the iPhone 5. Based on other threads I have seen, I have added the [email protected] as specified and I have added some new background images to the app that are sized appropriately. The problem is that the bottom portion of my app does not seem to be responding to touch (I have a page control and an info button).

Additionally, when switching screens (using the following code):

[self presentModalViewController:tableNavController animated:YES];

The bottom of the screen blacks out. This black section is basically exactly where I am unable to touch. Screenshot of this issue is below:

Screenshot with Black bar

Any ideas on why this would be happening? Why I cannot access this bottom section? Note if I run the regular iPhone 4S or iPad simulator this does not happen. I can access the entire section of the screen.

Edit: Could it be a simulator problem? I do not have a physical iPhone 5 yet, so I am unable to test it on a real device.

Edit2: I have tried both enabling and disabling Auto-Layout on both the views and the applications main window. If I add the following log statement to viewDidLoad:

NSLog(@"Window is: %0.0fx%0.0f", window.frame.size.width, window.frame.size.height);
NSLog(@"View is: %0.0fx%0.0f", viewController.view.frame.size.width, viewController.view.frame.size.height);

I receive Window is: 320x480. View is: 320x548. So it looks like it may be a problem with my window. I will continue to investigate.

Kuehnel answered 1/10, 2012 at 18:26 Comment(1)
What's the dimensions of the view you're displaying? Are you using AutoLayout?Streit
K
5

Figured it out. The main window was not getting resized although the view was. I deleted the window from my xib, created a new one and re-linked it. That solved the issue.

Kuehnel answered 1/10, 2012 at 18:47 Comment(1)
see this answer (from a duplicate question) for the exact code: https://mcmap.net/q/1478556/-email-160-protected-is-not-enough-can-39-t-tap-bottom-part-of-screen-duplicateDiane
P
5

This can be solved by enabling "Full screen at launch" on the window. Deleting and recreating merely enables this.

Pasol answered 8/10, 2012 at 16:51 Comment(0)
B
4

A simpler solution is to select the window and switch to the Attributes inspector. Change Size to Retina 4 Full Screen.

Brackely answered 12/10, 2012 at 3:49 Comment(0)
M
0

A simpler solution is to select the window and switch to the Attributes inspector. Change Size to Retina 4 Full Screen.

Steven's answer is correct, mostly. However now your window is larger than the screen on the 3.5" devices, and the right size on the 4" devices. Basically you will either have to adjust the window size at run-time if you later have anything that references the window, since that will return the 4" window otherwise.

for instance if you used this in your code [[[UIApplication sharedApplication] delegate] window]

Just be careful with this, that being said it will work for most applications.

Murdoch answered 3/11, 2012 at 20:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.