我的iOS应用程序中的键盘在iPhone 6上太高了。如何在XCode中调整键盘的分辨率? [英] The keyboard in my iOS app is too tall on the iPhone 6. How can I adjust the resolution of the keyboard in XCode?

查看:137
本文介绍了我的iOS应用程序中的键盘在iPhone 6上太高了。如何在XCode中调整键盘的分辨率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我正在调整已经存在的iOS应用程序到iOS 8和iPhone 6.目前iPhone 6上的键盘看起来很高(就像iPhone 6支持更新之前的WhatsApp应用程序)。有人可以告诉我我要做什么,在我的代码中解决这个问题吗?

Currently I am adjusting my already existing iOS App to iOS 8 and the iPhone 6. Currently the keyboard on the iPhone 6 seems pretty tall (like the WhatsApp app before the iPhone 6 Support Update). Can somebody tell me what I have to do, to fix this in my code?

推荐答案

这不是编码问题。您的应用程序正在针对较小的屏幕尺寸进行渲染,然后按比例放大以适应新的较大屏幕(包括键盘)。如果你想要正确渲染,你需要在iPhone 6和6 plus的原始分辨率中包含启动图像,但是如果你想让所有东西都增长到适合新的屏幕大小并且你需要增长,你可能需要使用自动布局额外空间的优势。

It's not a coding issue. Your app is being rendered for the smaller screen sizes and then scaled up to fit the new larger screens (including the keyboard). You need to include launch images in the native resolutions for the iPhone 6 and 6 plus if you want it to render properly, but you will likely need to be using auto-layout if you want everything to grow to fit the new screen sizes and take advantage of the extra space.

适用于iPhone 6:

750 x 1334 (@ 2x)for portrait
1334 x 750(@ 2x)for landscape

750 x 1334 (@2x) for portrait 1334 x 750 (@2x) for landscape

适用于iPhone 6 Plus:

1242 x 2208(@ 3x)for portrait
2208 x 1242(@ 3x)for landscape

1242 x 2208 (@3x) for portrait 2208 x 1242 (@3x) for landscape

或者你可以通过这个链接,它可以帮助你

or you can go through this link it may help you

http://matthewpalmer.net/blog/2014/09/10/iphone-6-plus-launch-image-adaptive-mode/

这篇关于我的iOS应用程序中的键盘在iPhone 6上太高了。如何在XCode中调整键盘的分辨率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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