IPhone 5 simulator - Can't click on the bottom of the screen?

I am trying to update the application to add support for iPhone 5. Based on the other streams that I saw, I added Default-568h@2x.png as indicated, and I added some new background images to the app the size accordingly. The problem is that the bottom of my application does not seem to respond to touch (I have a page control and info button).

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

 [self presentModalViewController:tableNavController animated:YES]; 

The bottom of the screen is black. This black section is basically exactly where I cannot touch. A screenshot of this problem is below:

Screenshot with Black bar

Any ideas on why this is happening? Why can't I access this bottom? Please note that if I run a regular iPhone 4S or iPad, this will not happen. I can access the entire section of the screen.

Edit: Could there be a problem with the simulator? I don’t have a physical iPhone 5 yet, so I can’t check it on a real device.

Edit2: I tried to enable and disable Auto-Layout both in the view and in the main application 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 get Window is: 320x480. View is: 320x548 Window is: 320x480. View is: 320x548 . So it looks like it could be a problem with my window. I will continue the investigation.

+7
source share
4 answers

Figured it out. The main window did not change, although the view was. I removed the window from my xib, created a new one and re-linked it. This solved the problem.

+5
source

This can be solved by turning on the "Full screen on startup" window. Removing and re-creating simply allows this.

+5
source

A simpler solution is to select a window and go to the attribute inspector. Resize to Retina 4 Full Screen .

+4
source

A simpler solution is to select a window and go to the Attributes inspector. Resize to Retina 4 Full Screen.

Stephen's answer is correct, basically. However, your window now has a larger screen on 3.5-inch devices and the correct size on 4-inch devices. Basically, you will have to either adjust the size of the window at runtime if you have something that references the window, otherwise it will return a 4-inch window.

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

Just be careful with this, as they say it will work for most applications.

0
source

All Articles