LoginSignup
0
1

【Swift】LaunchScreenの待機時間を設定する方法

Last updated at Posted at 2021-11-24

SwiftでLaunchScreenの待機時間を設定する方法。

解決コード

AppDelegateの関数の中身にコードを加えるだけ。

class AppDelegate: UIResponder, UIApplicationDelegate {

    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        // Override point for customization after application launch.
        sleep(UInt32(5)) //この部分を追加 この場合は5秒待機。
        return true
    }
}

AppDelegateの関数にsleep(UInt32(秒数))を追加するだけです。

秒数は少数でも可能です。

参考

Swiftのお役立ち情報

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1