如何为 flutter 应用程序创建 iOS LaunchScreen.storyboard?
How to create an iOS LaunchScreen.storyboard for a flutter app?
我正准备发布一个使用 flutter 创建的 iOS 应用程序,需要创建一个启动屏幕。为每个屏幕尺寸创建不同大小的资产似乎很痛苦,iOS 开发的推荐方法是使用看起来像应用程序第一个屏幕的故事板。有没有办法在不尝试在 Xcode 中创建自己的情节提要的情况下用 flutter 做到这一点?否则我将不得不尝试创建一个类似于我在 flutter 中创建的故事板。
To add an image to the center of your “splash screen”, navigate to
.../ios/Runner
. In, Assets.xcassets/LaunchImage.imageset
, drop in
images named LaunchImage.png
, LaunchImage@2x.png
, LaunchImage@3x.png
.
If you use different filenames, you’ll also have to update the
Contents.json file in the same directory.
You can also fully customize your launch screen storyboard in Xcode by
opening .../ios/Runner.xcworkspace
. Navigate to Runner/Runner
in the
Project Navigator and drop in images by opening Assets.xcassets
or do
any customization using the Interface Builder in
LaunchScreen.storyboard
.
结帐:https://flutter.io/assets-and-images/#updating-the-launch-screen
我正准备发布一个使用 flutter 创建的 iOS 应用程序,需要创建一个启动屏幕。为每个屏幕尺寸创建不同大小的资产似乎很痛苦,iOS 开发的推荐方法是使用看起来像应用程序第一个屏幕的故事板。有没有办法在不尝试在 Xcode 中创建自己的情节提要的情况下用 flutter 做到这一点?否则我将不得不尝试创建一个类似于我在 flutter 中创建的故事板。
To add an image to the center of your “splash screen”, navigate to
.../ios/Runner
. In,Assets.xcassets/LaunchImage.imageset
, drop in images namedLaunchImage.png
,LaunchImage@2x.png
,LaunchImage@3x.png
. If you use different filenames, you’ll also have to update the Contents.json file in the same directory.You can also fully customize your launch screen storyboard in Xcode by opening
.../ios/Runner.xcworkspace
. Navigate toRunner/Runner
in the Project Navigator and drop in images by openingAssets.xcassets
or do any customization using the Interface Builder inLaunchScreen.storyboard
.
结帐:https://flutter.io/assets-and-images/#updating-the-launch-screen