xcode 选项卡_Xcode中的启动屏幕:所有选项均已解释

xcode 选项卡

Launch screens appear when your app starts up and give the user the impression that your app is fast and responsive. After your app is loaded, the launch screen will be replaced with your app’s first screen at which point the user can start using your app.

当您的应用启动时,会出现启动屏幕,并给用户留下您应用快速且响应Swift的印象。 加载应用程序后,启动屏幕将替换为应用程序的第一个屏幕,此时用户可以开始使用您的应用程序。

Xcode creates a storyboard by default that you can use to set up your loading screen. Although this works fine in most cases, there are exciting new options available in Xcode 12 and iOS 14.

Xcode默认情况下会创建一个情节提要,可用于设置加载屏幕。 尽管这在大多数情况下都能正常工作,但是Xcode 12和iOS 14中提供了令人兴奋的新选项。

But before we dive in, let’s see how we all started implementing this back in the day.

但是,在我们深入研究之前,让我们看看我们是如何从今天开始实现这一目标的。

启动屏幕的历史 (The History of Launch Screens)

Launch screens have quite some history. Up until Xcode 6, the only option we had was providing static images inside an asset catalog. This was already better than before, as we used to set specific file names for those images to show up.

启动屏幕具有相当的历史。 直到Xcode 6,我们唯一的选择就是在资产目录中提供静态图像。 这已经比以前更好,因为我们曾经为要显示的图像设置了特定的文件名。

iOS 8, which came with Xcode 6, allowed us to replace the static image with a storyboard file. This already simplified and improved the way we could define loading screens, but the options were still limited. Launch screens were heavily cached and dynamic replacements weren’t really possible. However, using labels, image views, and other interface elements removed the requirement to open an image editing app to export images in all the right dimensions.

Xcode 6附带的iOS 8,使我们可以用情节提要文件替换静态图像。 这已经简化并改进了我们定义加载屏幕的方式,但是选项仍然有限。 启动屏幕被大量缓存,实际上不可能进行动态替换。 但是,使用标签,图像视图和其他界面元素消除了打开图像编辑应用程序以导出所有正确尺寸的图像的要求。

Xcode 12 and iOS 14 improved the launch screens described in this article.

Xcode 12和iOS 14改进了本文介绍的启动屏幕。

有关如何使用启动屏幕的准则 (Guidelines on How to Use Launch Screens)

Before we dive into the how and when, it’s good to know the purpose of a launch screen. It’s hard to do wrong, but it’s easy to make it better.

在深入探讨如何以及何时进行之前,最好先了解启动屏幕的目的。 很难做错事,但是很容易使其变得更好。

When preparing for implementations like a launch screen, it’s always good to revisit the Human Interface Guidelines from Apple. The guidelines give direction and the right start for you to make a great first impression on your users.

在准备启动屏幕之类的实现时,最好回顾一下Apple的《 人机界面指南》 。 该指南为您提供了方向和正确的开始,从而给用户留下了深刻的第一印象。

Without quoting everything from the guidelines, I think it’s most important to understand a few things:

在不引用指南中所有内容的前提下,我认为了解以下几点是最重要的:

  • Using text is discouraged, as localization is not available.

    不推荐使用文本,因为本地化不可用。
  • Any used images should scale well for different screen sizes.

    对于不同的屏幕尺寸,任何使用的图像都应缩放良好。
  • The screen should be as close as possible to your app’s first page.

    屏幕应尽可能靠近应用程序的首页。

The last point gives d

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值