Display Message In iPhone

Display message, its very easy to create. You just  type your firstname and lastname and click the button then message willl be display on your screen.

Step 1: Create a new project in Xcode using View base application.

Step 2: Add some code in the header file:

 

 

 

Step 3: Double click your .xib file and open it to Interface Builder. Click your View icon open the view window. Drag TextField  from the library and place it to view window. Then bring up attribute inspector, type “Enter your First Name”  in the placeholder. Do it once more time and  type “Enter Your Last Name”. Place Round Rect in the View window and give the name “Click”. Next drag Label from the library  and place it to view window. Now connect File’s Owner to the first TextField and select FirstName. Do it once more time and select LastName. Connect File’s Owner to the label and select ibiMessage. Select Round Rect and bring up connection inspector, drag TouchUpInside to File’s Owner and select Click: action. Now save your nib file and go back to the Xcode.

Step 4: In the view base class, we mention a method Click:. When we press the click button it shows the message.

 

 

 

Step 5: Now compile your application and run on the Simulator.(see figure 1)

Figure 1: Message Display.

You can downloaded SourceCode from here HelloWorld1 2

Leave a Comment: