iPhone - iPhone5支持现有的应用程序? [英] iPhone - iPhone5 support to existing app?

查看:140
本文介绍了iPhone - iPhone5支持现有的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是否必须单独放置一个xib,如iPhone5为1,iPhone4为1,较小的方式这样看起来非常糟糕。
任何人都可以了解它吗?还有iPhone5使用Autolayout?我不知道Autolayout是如何工作的。

Should i have to place a separate xib Like 1 for iPhone5 and 1 for iPhone4 and lesser Doing this way seems very bad practice. Can any one have idea about it? Also iPhone5 Using Autolayout? i am not getting how Autolayout works.

推荐答案

如果您的主要问题是新的屏幕大小,请确保添加Default-568h @ 2x.png。
您的应用需要640×1136图像才能使用iPhone 5的全屏。

If your main issue is the new screen size make sure to add Default-568h@2x.png. This 640 × 1136 image is needed for your app to utilize the iPhone 5's full screen.

还可以使用

[[UIScreen mainScreen] applicationFrame]

获取当前屏幕的宽度和高度。不要硬编码320宽480高。

to get the current screen's width and height. Do not hard code 320 width 480 height.

CGRect aFrame = [[UIScreen mainScreen] applicationFrame];
width = aFrame.size.width; height = aFrame.size.height;

这篇关于iPhone - iPhone5支持现有的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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