iosswiftiphonelaunch-screen

How can I change UILabel in LaunchScreen dynamically


I'm developing an application with Swift. When the application is first opened, I want it to say "welcome" on the launchscreen. Then when the user opens the application again, this time I want it to say "hello" on the launchscreen. In some of my research, apple does not allow dynamic coding on the launchscreen. But I come across this on the screens of some applications. Are they using a different method? How can I do this?


Solution

  • Launch screens have fixed content and cannot be changed. They appear before the app starts to execute and should look like an empty version of your initial user interface. Apple recommends not showing any text at all: https://developer.apple.com/design/human-interface-guidelines/patterns/launching/

    What you see in some other apps are splash screens. They are shown once the app starts running. Apple recommend against them too:

    Avoid creating a screen that looks like a splash screen or an "About" window, and don’t include logos or other branding elements unless they’re a fixed part of your app’s first screen.