0

I added LaunchImage in my assets and trying to load it on on Launch.storyboard UIImageView. But its not picking up the image.

My Launch Image Source is "LaunchImage". During launch my app is showing distorted image.

Thanks in advance.

Added all launch images with sizes

Not reading images from LaunchImage

enter image description here

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Arti
  • 245
  • 1
  • 2
  • 13

3 Answers3

0

This is wrong way to load splash screen. To show image from assets you need to change other setting.

Note : Select Launch image assets from project target General tab-> App icons and Lunch images -> Lunch Images Source. click on that and select LunchScreen from assets which you already added. Delete app and run again

Hardik Thakkar
  • 15,269
  • 2
  • 94
  • 81
  • I did try deleting app, xcode restart, project clean etc but nothing is working for me. – Arti Sep 14 '18 at 08:56
  • you set many resolution images in assets, did you need all of them for splash? or one easy solution unselect Lunch screen file. and set one image view in **LaunchScreen.storyboard**. after that take one image size is 1080 × 1920 and put that directly to **LaunchScreen.storyboard** imageview (you need to take one imageview of full screen and give constraints to them) – Hardik Thakkar Sep 14 '18 at 10:02
  • search how to set image in **LaunchScreen.storyboard** on google you will get idea if you not understand above solution. – Hardik Thakkar Sep 14 '18 at 10:09
  • Thanks for your help. But I need all those sizes for app. Also I have found the solution. whatever I am doing is correct but somehow there were 2 copies of assets with different names but LauchImage in both of them were different, That's why it was picking up the wrong size from the older one. – Arti Sep 14 '18 at 10:16
  • You can delete one of them and reset again. – Hardik Thakkar Sep 14 '18 at 10:27
0

Change your Launch screen source to LaunchImage under General Settings tab.

enter image description here

Dogan Altinbas
  • 268
  • 2
  • 11
0

Somehow there were 2 asset files in my project with different names and it was picking up the old LaunchImage I used earlier from the other assets file. Removing that file, clean project and relaunch solved the issue. Thanks for the help.

Arti
  • 245
  • 1
  • 2
  • 13