[英]Game Center view cut off on iPhone 5
I'm updating an older project to support the iPhone/iPod 5's 4 inch screen. 我正在更新一个较旧的项目,以支持iPhone / iPod 5的4英寸屏幕。 I've added the Default-568h@2x.png to my project, and almost everything seems fine, except:
我已将Default-568h@2x.png添加到我的项目中,除以下内容外,几乎所有内容看起来都不错:
Seems like my window isn't the correct length. 好像我的窗口长度不正确。
(I'm going to propose a solution, but I'd like some feedback as to whether or not this is a safe (or "correct") solution.) (我将提出一个解决方案,但我希望获得一些有关这是否是安全(或“正确”)解决方案的反馈。)
I've manually edited my MainWindow.xib file, changing the NSFrameSize from {320, 480} to {320, 568}, which has solved the apparent problem. 我已经手动编辑了MainWindow.xib文件,将NSFrameSize从{320,480}更改为{320,568},这已经解决了明显的问题。
This doesn't seem to be causing problems on older/smaller screens, but I'm wondering if this is the best across-the-board solution... 这似乎并不会在较旧/较小的屏幕上引起问题,但是我想知道这是否是最好的全面解决方案...
shouldn't you get the current screen size as in the height using following and then use it instead of changing it manually 您不应该使用以下命令获取当前屏幕尺寸的高度,然后使用它而不是手动更改
CGRect screenRect = [[UIScreen mainScreen] bounds];
CGFloat screenWidth = screenRect.size.width;
CGFloat screenHeight = screenRect.size.height;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.