NewGen

how to set splash screen image. 본문

IOS

how to set splash screen image.

Deep Learning 2019. 5. 9. 17:26

xcode version : Version 10.2.1

swift.

1. Change  Launch Image Source on Project general setup.

 

 

2. Select LaunchScreen.storyboard. 

 

 

 

3. Add image to Assets.xcassets.

4.  Add Image to LaunchScreen View controller 

 

5. set splash image show time

--> add : Thread.sleep(forTimeInterval: 3.0) //3 secs splash delay

 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

        // Override point for customization after application launch.

              

        Thread.sleep(forTimeInterval: 3.0) //splash delay

        return true

    }

 

6. If the image is not updated,

--> off xcode,

--> remove app from the target device.

--> del derived data : on terminal,

rm -vf /Library/Developer/Xcode/DerivedData/your project/*

 

7.start xcode , rebuild all and run again.

Comments