Skip to content

Latest commit

 

History

History
38 lines (31 loc) · 1.98 KB

README.md

File metadata and controls

38 lines (31 loc) · 1.98 KB

What is this? / これはなに?

Sample of initialization while continuing to display LaunchScreen at startup.
起動時にLaunchScreenを表示し続けながら初期化するサンプルです。

What I want to do / やりたいこと

S12019-09-17 6.11.02.png

After the LaunchScreen is displayed, StartupViewController is launched for initialization without changing the screen.
After initialization is completed, it transitions to MainViewController.

LaunchScreenを表示した後、画面はそのままで初期化用のStartupViewControllerを起動します。
初期化終了後にMainViewControllerへ遷移します。

How it works / どうやっているのか?

003.png

1. Instantiate LaunchScreen with a ViewController and get its view.
2. Prepare a variable retainedView to reference LaunchScreen to prevent the number of references from becoming zero.
3. Cut the reference from the unnamed ViewController to LaunchScreen.
4. Assign LaunchScreen to StartupViewController.

1. LaunchScreenをViewControllerごとインスタンス化してそのviewを取得します。
2. 変数retainedViewを用意してLaunchScreenを参照することで参照数が0になることを防ぎます。
3. 無名ViewControllerからLaunchScreenへの参照を切ります。
4. LaunchScreenをStartupViewControllerに割り当てます。

For more details / 詳細はこちら

Qiita (written in Japanese) LaunchScreenを表示したままにしてViewControllerを動かす

Execution Environment / 実行環境

  • Xcode 13.4.1
  • iOS (iPadOS) 13.0 or later

Specs / スペック

  • Dark Mode supported / ダークモード対応
  • iPad supported / iPad対応