在iPhone5 [[UISCreen主屏幕]界限] .size回复为320x480? [英] On iPhone5 [[UISCreen mainScreen] bounds].size comes back as 320x480?

查看:117
本文介绍了在iPhone5 [[UISCreen主屏幕]界限] .size回复为320x480?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iPhone5上[[UISCreen主屏幕]界限] .size回复为320x480。为什么。在我正在阅读的所有帖子中,人们都说它返回了正确的屏幕尺寸。这里发生了什么?我错过了.plist文件中的内容吗?

On iPhone5 [[UISCreen mainScreen] bounds].size comes back as 320x480. Why. In all the posts I'm reading, people are saying that it returns the correct screen size. What is going on here? Am I missing something in the .plist file or something?

BTW我手工编写GUI,因此没有XIB。

BTW I am hand coding the GUI, so there is no XIB.

推荐答案

除非您的应用程序在其捆绑包中包含Default-568h.png,否则它将在iPhone 5上的480点高传统屏幕沙箱内运行,但不能绘制或查看沙箱外的任何尺寸。

Unless your app includes a Default-568h.png in it's bundle, it will run inside a 480 point high legacy screen sandbox on the iPhone 5, and can't draw or see any dimensions outside that sandbox.

请注意,只有在使用Xcode 4.5和iOS 6 SDK构建应用程序时才允许包含此Default-568h.png(或(可能是,稍后)提交给Apple的App商店。

Note that including this Default-568h.png is only allowed when building an app using Xcode 4.5 and the iOS 6 SDK (or, presumably, later) for submission to Apple's App store.

添加:使用iOS 8 SDK(或更高版本)构建并在iOS 8(或更高版本)下运行应用程序时),LaunchScreen.xib还将移除480高度的沙箱。

Added: When building with the iOS 8 SDK (or later) and running the app under iOS 8 (or later), a LaunchScreen.xib will also remove the 480 height sandbox.

这篇关于在iPhone5 [[UISCreen主屏幕]界限] .size回复为320x480?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆