Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set background image for launchscreen.xib in ios

I need to set a background color or background image in my iOS application's launch screen. I was wondering if there was a code similar to:

self.view.backgroundcolor=[UIColor redColor];

Thank you

like image 685
Sidharth J Dev Avatar asked Dec 25 '22 20:12

Sidharth J Dev


1 Answers

If you want to set background image for launch screen than there is two way:

  1. Use image.axassets and add new LaunchImage set in it.
  2. You can add UIImageView in LaunchScreen.xib and set image to it.

If you want to set background colour for launch image than add UIView in LaunchScreen.xib and set backgroundColor propertity of it.

Both way is easy but I preferred to go with image.axassets LunchImage set.

Note: If you use image.axassets LaunchImage than do not forget to migrate this set with application.

like image 170
Ajay Gabani Avatar answered Jan 05 '23 04:01

Ajay Gabani