Sidharth J Dev Sidharth J Dev - 1 year ago 169
iOS Question

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

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download