Simple Application In iPhone

This is the Simple application . In this this application you select the answer from  the given data for the question. If you given the right answer it will show “Correct Answer” otherwise it’ll show “Wrong Answer”. So let see how it will be worked.

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

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 ViewbaseApplicationViewController class for you. Expand Resources and notice the template generated a separate nib, ViewbaseApplicationViewController.xib, for the “ViewbaseApplication”.

Step 4: Open the ViewbaseApplicationViewController.h file , we have added UILabel for display , UIButton for button and add methods. So make the following changes:

 

 

 

Step 5: Double click the ViewbaseApplicationViewController.xib file and open it to the Interface Builder. Drag labels from the library and place it to the view window and drag Round Rect from the library and place it to the view window.Connect File’s Owner icon to the view icon select the view. Select File’s Owner icon to the each of label and button . Select CleanAnswer button and bring up connection inspector and drag TouchUpInside to the File’s Owner icon and select cleanAnswer: action, select firstanswer button and bring up connection inspector and drag TouchUpInside to the File’s Owner icon and select firstAnswerbutton: action. do it for next two answer button and select the secondAnswerbutton and thirdAnswerbutton  action (See the figure below). Now save the ViewbaseApplicationViewController.xib file, close it and go back to the Xcode.

Step 6: In the ViewbaseApplicationViewController.m file, make the following changes:

 

 

 

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

You can download SoureceCode from here ViewbaseApplication

Leave a Comment:

5 comments
Patrick says May 12, 2010

Thanks for these tutorials.

“What does 9*9 equal to?” should be:
“What is 9*9 equal to”.

Reply
    anonymous says December 23, 2010

    brush up your grammar Patrick.. both sentences are correct. the first one employs “equal” as a verb..BTW it is not about the grammar..did you like the article?

    Reply
Patrick says May 12, 2010

Sorry, left the question mark out of my earlier post:

“What does 9*9 equal to?” should be:
“What is 9*9 equal to?”

Reply
Sushant says June 5, 2010

Did you checked it on your simulator? I have checked but it working fine on the simulator. If there is any problem please let us know.

Reply
VA says March 10, 2011

Can you please provide a tutorial on how to scroll 3D Images like the image of this tutorial ? TY

Reply
Add Your Reply