Quantcast
Channel: iPhone Tutorial | iPhone iOS4 iPad SDK Development & Programming Blog » iPad application
Viewing all articles
Browse latest Browse all 2

TabBarController Application in iPad

$
0
0

TabBarController Application, in this application we will see how to run it in the iPad. This is the very simple application, i will show you using only Interface Builder how to implement simple TabBarController application in the iPad. So let see how it will be worked.

Step 1: Create a new project using TabBar Application template. Give the application name “TabBarApplicationiPad”.

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: xpand classes and notice Interface Builder created the FirstViewController and SecondViewController classes for you. Expand Resources and notice the template generated a separate nibs, FirstViewController.xib andSecondViewController.xib , for the “TabBarApplicationiPad”.

Step 4: Double click the MainWindow.xib file and open it to the Interface Builder. Then you can see the in MainWindow.xib file TabBarController already included there. Open the TabBar Controller view and click the First Tab, then it will show you View loaded from the FirstView. That means First Tab content loaded from the FirstView.xib file (See the below figure).

Step 5: Now double click the FirstView.xib file and open it to the Interface Builder. Open the View window, click on it and bring up Attribute Inspector next the background color. Next drag the label from the library and place it to the view window and give the label name “First View”(See in the below figure). Now save it, close it and go back to the Xcode.

Step 6: Open the SecondView.xib file in the Interface Builder.Open the view window, click on it and bring up Attribute Inspector and change the background color. Next drag the label from the library and place it to the view window and give the label name “Second View” (See in the below figure). Now save it, close it and go back to the Xcode.

Step 7: After doing in 6 simple step, your application will be ready for run in the Simulator. So now compile and run it in the Simulator.

You can download SourceCode from here TabBarApplicationiPad


Viewing all articles
Browse latest Browse all 2

Trending Articles