Xcode 6会自动为iPhone 6和6 plus调整应用程序的大小 [英] Xcode 6 resizes app automatically for iPhone 6 and 6 plus

查看:90
本文介绍了Xcode 6会自动为iPhone 6和6 plus调整应用程序的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在iPhone 5英寸故事板上为iOS 7开发Xcode 5应用程序。我准备了我的应用程序及其按钮,图像和其他东西,以适应iPhone 5的屏幕尺寸,然后编程优化的应用程序,以适应iPhone 4和4s。

I was developing app in Xcode 5 for iOS 7 on iPhone 5 inch storyboard. I prepared my app and its buttons, images and other stuff to fit iPhone 5 screen size, and then programmatically optimized app to fit iPhone 4 and 4s.

然后Xcode 6来了,还有两款新设备,iPhone 6和iPhone 6 plus。我以为我将不得不再花几个小时来以编程方式优化这些决议的应用程序。

And then Xcode 6 came, and two new devices, iPhone 6 and iPhone 6 plus. I was thinking that i will have to spend few hours again to programmatically optimize app for those resolutions.

但我尝试在我的新iPhone 6上运行我的应用程序并发生了奇怪的事情。应用程序本身为我做了一切。一切都在正确的位置和正确的大小,我没有做任何事情。

But i tried run my app on my new iPhone 6 and strange thing happened. App itself made everything for me. Everything was in right position and right size and i haven't done anything.

我看到Xcode 6现在使用Size Classes为多个设备开发应用程序。

I saw that Xcode 6 now uses Size Classes to develop app for multiple devices.

但我没有在我的项目中使用大小类和自动布局而且它有效吗?

But i am not using Size Classes and Auto Layout in my project and it works?

然后我打开了新项目。在我的新项目中,调整大小不再像这样工作了。所以它不会自动调整我的按钮,视图和其他内容。

I opened new project then. In my new project resizing is not working like this anymore. So it won't resize my buttons, views and other stuff automatically.

有谁知道发生了什么?

Has anyone have any idea what is happening?

推荐答案

如果您不使用发布故事板或包含新iPhone 6尺寸的启动图像,整个屏幕将会展开以填充新设备大小(启用放大辅助功能设置时会发生同样的事情)。 iPhone 6用户会注意到更大的字体,图像等。

If you don't use a launch story board or include launch images for the new iPhone 6 sizes, the entire screen will expand to fill the new device size (same thing happens when enabling Zoom in accessibility settings). The iPhone 6 user will notice larger fonts, images, etc.

这就是正在发生的事情。问题是你没有利用额外的屏幕空间(额外的像素)。如果这对你来说很酷,那么请保留它,但是当你最终优化你的应用程序以使用这个额外的空间时,iPhone 6用户会突然抱怨在停止自动缩放时字体大小变小了。

This is what's happening. The problem is that you don't get to take advantage of extra screen real estate (extra pixels). If that's cool with you, then keep it, but when you do finally optimize your app to use that extra real-estate the iPhone 6 users will suddenly complain that the font size has gotten smaller when it stops auto-zooming.

您应该花时间为iPhone 6优化它并包括启动图像(如果仅支持iOS 8+,则启动故事板),并添加Optimized for iPhone 6注释到您的应用说明。

You should spend the time to optimize it for iPhone 6 and include launch images (or launch story board if supporting iOS 8+ only), and get the "Optimized for iPhone 6" note added to your app description.

这篇关于Xcode 6会自动为iPhone 6和6 plus调整应用程序的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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