用户登录
用户注册

分享至

我的 iOS 应用程序中的键盘在 iPhone 6 上太高了.如何在 XCode 中调整键盘的分辨率?

  • 作者: 再也不会用心爱
  • 来源: 51数据库
  • 2023-02-09

问题描述

目前我正在将我现有的 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) 纵向横向 1334 x 750 (@2x)

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

对于 iPhone 6 Plus:

1242 x 2208 (@3x) 纵向横向 2208 x 1242 (@3x)

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/

软件
前端设计
程序设计
Java相关