启动屏幕的自定义文件

Custom File for Launch Screen

我正在制作一个需要对启动屏幕进行编程的应用程序,而不仅仅是将图像放在 .xib 文件中。有没有办法将 swift 文件连接到启动屏幕以便我可以添加动画?

我正在考虑做一些类似 Supercell 为《部落冲突》所做的事情,其中​​有一个加载栏和一条用户可以在游戏加载时查看的短消息。

那么是否可以将 swift class 文件连接到 .xib 启动屏幕,如何进行呢?

谢谢

很遗憾,您的应用无法在此启动屏幕期间处理或显示任何动画。这是因为该应用程序在技术上仍在加载。

它还与 Apple 的启动屏幕设计指南相矛盾:

Design a plain launch image that improves the user experience. In particular, the launch image isn’t an opportunity to provide:

An “app entry experience,” such as a splash screen

An About window

Branding elements, unless they are a static part of your app’s first screen

您可以做的是添加您自己的自定义 "animation screen" 作为故事板(或只是根视图)的入口点,并像往常一样通过视图控制器 swift 文件创建动画。