Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
375 views
in Technique[技术] by (71.8m points)

objective c - iphone 5 simulator - Cannot click on bottom of screen?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...