UIImageView not reading LaunchImage form Assets
UIImageView not reading LaunchImage form Assets
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.



3 Answers
3
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
I did try deleting app, xcode restart, project clean etc but nothing is working for me.
– Arti
Sep 14 '18 at 8: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
Change your Launch screen source to LaunchImage under General Settings tab.
LaunchImage

I am using LaunchImage in "Launch Image sourc".
– Arti
Sep 14 '18 at 8:52
try to clean project by cmd+shift+K and also from Simulator > Hardware > Erase All Content and Settings After that, it should work.
– Dogan Altinbas
Sep 14 '18 at 9:01
The second screenshot is wrong if you use assets no need to use below option.
– Hardik Thakkar
Sep 14 '18 at 9:23
No it is not, launch screen file is left empty.
– Dogan Altinbas
Sep 14 '18 at 9:26
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.
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
This is wrong way to load splash screen. To show image from assets you need to change other setting.
– Hardik Thakkar
Sep 14 '18 at 8:44