How To SplashScreen Display In The iPhone

In this application we will se  how to display SplashScreen. When user run the application, it will show the splashScreen after some time it will automatically remove from the Screen. Basically this is the very simple application. So just have a look, how it will be worked.

Step 1: Create a View base application using template. Give the application name “DisplaySplashScreen”.

Step 2: Xcode automatically creates the directory structure and adds essential frameworks to it. You can explore the directory structure to check out the content of the directory.

Step 3: Expand classes and notice Interface Builder created the DisplaySplashScreenViewController class for you. Expand Resources and notice the template generated a separate nib, DisplaySplashScreenViewController.xib, for the “DisplaySplashScreen”.

Step 4: We need to add the resource file called as “themes.png” into the resource folder. Select resources and add files existing sources and select the themes.png.

Step 5: In the DisplaySplashScreen.h file, we have added UIView for display the screen and mention two methods. So make the following changes:

 

 

 

Step 6: Double click your DisplaySplashScreen.xib file open it to the Interface Builder. Drag the view from the library and place it to the Main Window(See the figure1 below). Open the second view icon from the MainWindow,drag the image view from the library and place it to the view window,select the view and bring up Attribute Inspector select the image “themes.png”. Select the File’s Owner icon from the MainWindow and bring up Connection Inspector, drag from the displayScreen to the last view icon (See the figure2 below) and connect File’s Owner icon to the view (See the figure3 below). Now save it , close it and go back to the Xcode.

Figure1: MainWindow

Figure 2: Connection Between displayScreen and View icon.

Figure 3: Connection Between File’s Owner icon to the View icon.

Step 7: Open the DisplaySplashScreen.m file, you will see here splash will be displayed 4 to 5 sec in the main screen after that splash screen will be removed from the Main Screen. So make the following changes:

 

 

 

Step  8: In the DisplaySplashScreenAppDelegate.m file make the following changes in the file.

 

 

 

Step 9: Now compile and run the application in the Simulator.

You can downloaded SourceCode from here DisplaySplashSceen 2

Leave a Comment:

2 comments
Naseem says July 25, 2010

Great!
Thanks a bunch 🙂

Reply
javi says December 28, 2010

Thanks!

Very helpfully code 🙂

Reply
Add Your Reply