Hello Folks,
iOS 14 will come with too many new stuff for iOS Developers! Here, I am just exploring about new APIs of iOS 14. I get to know that there is new setup for the Launch Screen directly from the Info.plist file.
Just follow the simple steps posted here!
Launch Screen Image
First of all, no need of launch screen storyboard. So, Just remove the storyboard launch screen file setting from the general settings.
Now, iOS 14 comes with new property in information plist called UILaunchScreen. Update the plist file of your project with following settings:
1 |
<key>UILaunchScreen</key><br><dict><br> <key>UIImageName</key><br> <string>LSImage</string><br></dict><br> |
This is a dictionary. In that there is UIImageName key in that you can give the name of image asset. Here, my asset name is “LSImage”.
Launch Screen Background Color
It’s very easy if you just want to set background color in your launch screen.
Create color asset and give name of that into the info plist file as UIColorName.
1 |
<key>UILaunchScreen</key><br><dict><br> <key>UIColorName</key><br> <string>LSColor</string><br></dict><br> |
That’s It!
Conclusion
Xcode 12.x is required for above launch screen setup. Currently it’s in beta.
So many things are there to explore in iOS 14 and macOS Big Sur. If I get time, I will keep posted!
I am posting tweets/retweets about iOS everyday.
I hope you learned something. If you did, feel free to share this article with a friend or on social media. Let me know if you have any questions, comments or feedback – either via Twitter or email.
Stay Safe At Home. Learn Something New. Share To The World.
Happy Coding ?