1

So while I realize leaving your launch image up for a long time can seem annoying or pretentious to the user, when I launch the Xcode simulator, the launch image only stays up for 0.5 sec - 1 sec. I want it to stay for like 1 more second.

How can I do this?

blue
  • 7,175
  • 16
  • 81
  • 179

2 Answers2

3

You could add a UIImageView to your view controller's view, then use an NSTimer or performSelector:withObject:afterDelay: call to call a method to remove it.

rebello95
  • 8,486
  • 5
  • 44
  • 65
3

What worked for me in Obj-C is just putting this in the app delegate didFinishLaunching

[NSThread sleepForTimeInterval:0.5];

0.5 being the number of seconds to wait. So I would assume in Swift it would just be

NSThread.sleepForTimeInterval(0.5);

Put that in the App Delegate with your interval.

Eytan Schulman
  • 566
  • 2
  • 4
  • 20
  • Are you sure this will not stop main thread? If there is some stuff being downloaded, will it not be suspended? – iBug Aug 16 '16 at 09:28