iOS Universal应用似乎在手机上略有放大 [英] iOS Universal app seems slightly zoomed in on phone

查看:124
本文介绍了iOS Universal应用似乎在手机上略有放大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个iPad应用程序,正在将其转换为通用应用程序以在手机上显示.它同时具有一个标签栏和一个导航栏,我的问题是它们在手机上太大了.我可以发誓,我听说Paul Hegarty(来自Stanford的Swift U开发应用程序的iTunes U类)提到了某个开关或技巧,可能会导致酒吧适应iPhone,但我找不到它.

I have an iPad app that I'm converting to a universal app to show on phones. It has both a tab bar and a navigation bar, and my problem is that they are both way too big on the phone. I could swear I heard Paul Hegarty (from the iTunes U class from Stanford on Swift app development) mention a switch or trick somewhere that would cause the bars to adapt to the iPhone, but I can't find it.

这是我的应用程序栏的屏幕截图,而iPhone 6模拟器中的照片"应用程序则显示了我在说什么.

Here are screenshots of my apps bars, vs the Photos app in the iPhone 6 simulator to show what I'm talking about.

差别不大,但在小手机屏幕上却很重要.

Not a huge difference, but significant on a small phone screen.

我的字体也变大了,这令人困惑,因为我将所有大小类的字体都设置为系统的标题"或正文"选项,但这可能是一个单独的问题.

My fonts are also way to big, which is confusing since I have them set to the system "headline" or "body" options for all size classes, but that may be a separate issue.

任何帮助将不胜感激!

使用Swift编写的应用,使用iOS8故事板,顺便说一句.

App written in Swift, using storyboards for iOS8, btw.

我看得越多,就越确信与酒吧无关,而与整个应用程序无关-字体和所有内容.整个应用似乎放大了120%,虽然微妙,但看起来确实很糟糕,而且浪费了空间.

The more I look at this, the more I'm convinced it's not related to the bars, but the entire app - the fonts and everything. The whole app appears to be zoomed in to 120%, which is subtle, but looks really bad and wastes space.

我现在还在第二个应用程序中看到了这一点-苹果

I have also now seen this in a second app - the Apple DateCell sample. It also appears 'zoomed in' when run on the iPhone 6 simulator.

在iPhone 6 Plus模拟器上,这种效果甚至更加夸张-外观看起来更加放大"-顶部和底部的条形几乎是它们应有的高度的两倍.通过下载Apple DateCell示例并运行它可以看到这一点.

Edit 2: This effect is even more exaggerated on the iPhone 6 Plus simulator - everything is even more 'zoomed in' looking - the top and bottom bars are almost twice the height they should be. This can be seen by downloading the Apple DateCell sample and running it.

ARGGGG一直浪费时间,这是由于启动屏幕图像所致-为什么在地球上未设置启动屏幕图像会导致整个应用程序缩放?

Edit 3: ARGGGG, all this time wasted, and it was due to the launch screen image - why on earth would a launch screen image not being set cause the entire app to scale?

推荐答案

我终于弄明白了-它与启动屏幕图像有关.显然,如果设置不正确,则由于某种原因,整个应用程序都可以在iPhone 6和6 Plus上缩放. 这个问题是使我指向答案的原因.

I finally figured this out - it was related to the launch screen image. Apparently if it's not setup right, the whole app scales on the iPhone 6 and 6 Plus for some reason. This question is what pointed me to the answer.

对我来说,我必须在Assets中创建一个LaunchScreen图像,并将其设置在项目文件中,然后还要在项目中选择launchScreen.xib作为启动屏幕文件.我还没有一个真正的启动屏幕,所以这两个都是空的或我的默认设置.

For me, I had to both create a LaunchScreen image in Assets, and set it in the project file, and ALSO select the launchScreen.xib as the Launch Screen File in the project. I don't have a real launch screen yet, so these are both just empty or defaults in my case.

这篇关于iOS Universal应用似乎在手机上略有放大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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