Two Splash Screen Display in iPhone

Two Splash Screen display in iphone

In this application we will see how to applied two splash screen in the iPhone. So let see how it will work.

Step 1: Open the Xcode, Create a new project using Window Base application. Give the application “TwoSplashScreen”.

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: We need to add three UIViewController in the class in the project. So select the project -> New File -> Cocoa Touch ->ViewController class and give the class name “SplashScreen”,”FirstView” and “SecondView”.

Step 4: We need to add two image in the Resource folder.

Step 5: Open the TwoSplashScreenAppDelegate.h file and make the following changes in the file.

 

 

 

Step 6: Double click the MainWindow.xib file open it to the Interface Builder. First drag the “Image View” from the library and place it to the window. Select the window and bring up attribute inspector and select the “logo.png”. Now save it, close it and go back to the Xcode.

Step 7: In the TwoSplashScreenAppDelegate.m file make the following changes:

 

 

 

Step 8: Open the SplashScreen.h file and make the following changes in the file:

 

 

 

Step 9: Double click the SplashScreen.xib file and open it to the Interface Builder. First drag the “Image View” from the library and place it to the window. Select the window and bring up attribute inspector and select the “screen.png”.Connect File’s Owner icon to the Image View and select displaySplash. Drag the TabBarController from the library in the interface builder. First select the first tab from the TabBarController and bring up Identity Inspector and select “FirstView” class. Do the same thing for the Second Tab and select “SecondView”.Now save it, close it and go back to the Xcode.

Step 10: In the SplashScreen.m file make the following changes:

 

 

 

Step 11: Now double click the FirstView.xib file and open it to the Interface Builder. Select the View and bring up Attribute Inspector and change the background color. Now save the it , close it and go back to the Xcode.

Step 12: Double click the SecondView.xib file and open it to the Interface Builder. Select the View and bring up Attribute Inspector and change the background color. Now save the it , close it and go back to the Xcode.

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

You can Download Source Code from here TwoSplashScreen

Comments 1

Leave a Reply

Your email address will not be published. Required fields are marked *