制作第三代iPad应用程序的注意事项 [英] Considerations for making 3rd-generation iPad applications

查看:77
本文介绍了制作第三代iPad应用程序的注意事项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在制作一个iPad应用程序,其中的视图是为iPad 2分辨率创建的。然而,现在iPad已经出来了双倍的分辨率,我还需要支持。直接说明在应用程序中进行哪些更改,以便支持iPad 2和第三代iPad。我唯一能想到的方法是程序控制视图框架和布局的子视图将是噩梦:-)。如果有更好的,更可扩展的方式做,帮助。



非常感谢您提供的所有帮助。

解决方案

您不必更改视图的框架。



因此,如果你有一个名为 MyImage.png

的图片, code>大小为 100x100 的code>,添加一个名为 MyImage@2x.png 大小 200x200



没有要更改的代码。如果您遵守向图像名称添加后缀 @ 2x 的惯例,则将根据屏幕分辨率使用正确的图像(标准或高分辨率)



最后,不要忘记添加图标并使用正确的尺寸。 >

I am currently making an iPad application where the Views were created for iPad 2 resolution. However, now that iPad has come out with double the resolution, I also need to support that. Pls direct on what changes to make in the application so that both iPad 2 and 3rd-generation iPad are supported. The only way I can think of is programatically controlling the view frames and laying out the subviews which will be nightmare :-). Pls help if there is a better, more scalable way of doing it.

Thanks so much for all your help in advance.

解决方案

You don't have to change the frames of your views. The only thing to do is to add double resolution versions of the images you use.

So if you have an image called MyImage.png with a size of 100x100, add a new image called MyImage@2x.png and with a size of 200x200.

There is no code to change. If you respect the convention of adding the suffix @2x to the names of your images, then, the right image (standard or high resolution) will be used according to the screen resolution of the device.

Finally, don't forget to add icons and launch images with the correct dimensions for the new iPad.

这篇关于制作第三代iPad应用程序的注意事项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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