IPhone Tutorial2 -(View Based Application)

December 26th, 2009 by aabhaanjan

Hi All I will show you how to create “Welcome ” application using the interface builder . There are many way to create application in IPhone .IN this tutorial no need to write code at all .

Create a new View based Project

Process to Create Application

  1. Open XCode for creating a new View – Based Application .

Go -> File ->New Project and select View Based Application and name the project Welcome

I have already described in earlier tutorial,When you are creating application there are some additional file which I have already described . Here you can only see one view at a time, you will need to create a new view for each screen in your application.

Go ahead and click Build and Go.

Process to Create Application

1. Open XCode for creating a new View – Based Application .

2.Go -> File ->New Project and select View Based Application and name the project Welcome

I have already described in earlier tutorial,When you are creating application there are some additional file which I have already described . Here you can only see one view at a time, you will need to create a new view for each screen in your application.

Go ahead and click Build and Go.

The program will compile and launch the iPhone Simululator. Your screen should look something like this.

you want to display “WelCome to IPhone”. So let’s add some UI components to our view to make it more interesting. To do this we will be editing WelcomeViewsViewController.xib . A file with the .xib extension is known as a nib file. These files open with Interface Builder and are where you define the look and feel of your application. Apple is nice enough to have provided us with one.

Once you open Interface Builder, you should see a few different windows… You should see a blank window that says View. If not click the View icon in the smaller box. This is the main window we will be editing.

Just click on the one’s you want and drag them on to your view. Make sure you at least use a Label.

Executing the Code

Go ahead and click Build and Go again to launch the iPhone Simulator. Your screens should look something like this:

Once you open Interface Builder, you should see a few different windows… You should see a blank window that says View. If not click the View icon in the smaller box. This is the main window we will be editing.

Just click on the one’s you want and drag them on to your view. Make sure you at least use a Label.

Executing the Code

Go ahead and click Build and Go again to launch the iPhone Simulator. Your screens should look something like this:

If you have any questions, feel free to leave them in the comments.

Tags: , , , , , , , , , , , , , , , , , , , , ,