tags:

views:

102

answers:

2

Hi,

I have used to loading a default image in my appication. So i have set to,

      Sleep(3); in my delegate.m class.

But sometimes it will take more than 6 to 7 minutes. So i want to display the image 3 seconds only and then it goes to my appilcation based on my requirements.

Which one is best way to do that?

     Sleep(3) or [NSThread sleepForTimeInterval:3.0] or something else; 

And i must display the image 3 seconds only. Please explain me. (Note: And I declared setter and getter methods only in my deleagte class.)

Please explain me.

+2  A: 

Apple strictly recommends against this (using sleep in this way), especially in the scenario of showing a splash screen.

The best thing to do is create a view that looks like your Default.png file, then have that be the first NIB.. you could then set an NSTimer to transition (with animation if you want) to your main view/window/controller.

iWasRobbed
+1 A splash screen is a bad idea unless it is hiding some necessary process.
TechZen
+1.@Rob. Thanks for the reply.
Pugal Devan
+2  A: 
TechZen
+1.@TechZen Thanks for your detailed answer. Thanks a lot.
Pugal Devan