Sidharth J Dev
Sidharth J Dev

Reputation: 987

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

Upvotes: 5

Views: 15254

Answers (1)

Ajay Gabani
Ajay Gabani

Reputation: 1178

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.

Upvotes: 11

Related Questions