Get to the point, iPhone development tutorials for those programmers who want concise step by step tutorials, but do not have the time to watch a 30 min video tutorial.

Get to the point – iPhone Development: Tab Bar Application (Adding new views)

1- Open Xcode and create a new “Tab Bar Application” (see Figure 1). Name it tabbartest (see Figure 2).


Figure 1


Figure 2

2- Xcode will create the necessary files for a basic Tab Bar Application (see Figure 3).


Figure 3

3- By double clicking the MainWindow.xib file Interface Builder will show up (see Figure 4). If the Inspector and Library windows don’t appear, open them (Tools->Library, Tools->Inspector).


Figure 4

4- Go back to Xcode and create a new file (File->New File). From the User Interface menu list select “View XIB” (see Figure 5). Name this view as ThirdView.xib (see Figure 6).


Figure 5


Figure 6

5- From Xcode double click the ThirdView.xib file. Interface Builder will show up again (see Figure 7).


Figure 7

6- Click on the File’s Owner icon. Go to the Inspector window and click on the “View Identity” icon. From the Class list select FirstViewController (see Figure 8).


Figure 8

7- Click on the “View Connection” menu option. Click on the view outlet, then drag & release it on the view canvas (see Figure 9). If you do this correctly the “View Connection” window should look like Figure 10.


Figure 9


Figure 10

8- Go back to Xcode and open the MainWindow.xib file. Add a new Tab Bar Item (see Figure 11) by selecting it from the Library. Drag the Tab Bar Item to the Tab Bar Controller (see Figure 12).


Figure 11


Figure 12

9- Click on the newly added Tab Bar Item and select the “View Controller Attributes” from the Inspector Window (see Figure 13). Set the NIB Name parameter to ThirdView (see Figure 14). Once the NIB Name is set, your MainWindow file should show the text “Loaded From ThirdView” (see Figure 15).


Figure 13


Figure 14


Figure 15

10- Save all your Xcode & Interface Builder files. Click “Build and Run” from Xcode. The Tab Bar Application will show up on the iPhone Simulator with a third Tab Bar Item (see Figure 16).


Figure 16

Tab Bar Application – Source Code

Posted By admin

    5 Responses to “Get to the point – iPhone Development: Tab Bar Application”

  1. [...] Read more: Get to the point – iPhone Development: Tab Bar Application « Linux … [...]

  2. Joe says:

    Great tutorial!!!

  3. adana says:

    oops.. you saved me.. thanks!!!

  4. sahiti says:

    Great tutorial! THanks!

  5. soufiane says:

    THANK YOU VERY MUCH , U ARE A KIND MAN !! NICE JOB ! I’M GONNA START WORKIN ON IPHONE DEV WITH YOUR TUTORIALS !
    WISH ME GOOD LUCK :p !

Leave a Reply




XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>