5

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

Bryan Ash
  • 4,385
  • 3
  • 41
  • 57
Sidharth J Dev
  • 927
  • 1
  • 6
  • 25
  • you can set your own launch image from image.axassets – Shruti Apr 16 '15 at 11:13
  • Please look at this previously asked question at SO [link][1] [1]: http://stackoverflow.com/questions/25772862/ios-8-background-gradient-for-launch-screen-file – KP_G Apr 16 '15 at 11:14
  • Want to set background color or Background Images? If you want to set background image, Just refere [THIS](http://stackoverflow.com/questions/29624085/splash-screen-for-ios-in-xcode-6-2/29624267#29624173) – Viral Savaj Apr 16 '15 at 11:19

1 Answers1

11

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.

egor.zhdan
  • 4,555
  • 6
  • 39
  • 53
Ajay Gabani
  • 1,168
  • 22
  • 38