Mobile application developer
View PDF | Print View
by: Rakesh3
Total views: 24
Word Count: 598
Date: Wed, 30 Jun 2010 Time: 3:56 AM
We started talking about Design Patterns in our first part of the document, you have not checked please check iPhone applications
Continue from 1st part…
In this iPhone application, the application object tells its delegate that the main start-up routines have finished and that the custom configuration can begin. For this iPhone application, you want the delegate to create an instance of a controller to set up and manage the view. In addition, the text field will tell its delegate (which in this case will be the same controller) when the user has tapped the Return key.
Delegate methods are typically grouped together into a protocol. A protocol is basically just a list of methods. If a class conforms to a protocol, it guarantees that it implements the required methods of a protocol. (Protocols may also include optional methods.) The delegate protocol specifies all the messages an object might send to its delegate.
Model-View-Controller
The Model-View-Controller (or “MVC”) design pattern sets out three roles for objects in an application.
Model objects represent data such as SpaceShips and Rockets in a game, ToDo items and Contacts in a productivity application, or Circles and Squares in a drawing application.
In this application, the model is very simple—just a string—and it’s not actually used outside of a single method, so strictly speaking it’s not even necessary. It’s the principle that’s important here, though. In other applications the model will be more complicated and accessed from a variety of locations.
View objects know how to display data (model objects) and may allow the user to edit the data.
In this application, you need a main view to contain several other views—a text field to capture information from the user, a second text field to display text based on the user’s input, and a button to let the user tell us that the secondary text should be updated.
Controller objects mediate between models and views.
In this application, the controller object takes the data from the input text field, stores it in a string, and updates a second text field appropriately. The update is initiated as a result of an action sent by the button.
Target-Action
The target-action mechanism enables a view object that presents a control—that is, an object such as a button or slider—in response to a user event (such as a click or a tap) to send a message (the action) to another object (the target) that can interpret the message and handle it as an application-specific instruction.
In this application, when it’s tapped, the button tells the controller to update its model and view based on the user’s input.
You create the project using Xcode and find out how an application launches.
Xcode
The main tool you use to create applications for iPhone OS is Xcode—Apple’s IDE (integrated development environment). You can also use it to create a variety of other project types, including Cocoa and command-line utilities.
Launch Xcode (by default it’s in /Developer/Applications), then create a new project by choosing File > New Project. You should see a new window similar to this:

Continued to next article mobile app development
For more information on Mobile application developer you can visit our web site http://asglobal.co.uk/iPhone_apps.html
About the Author
Hi, this is Rakesh Mishra from Indian SEO, we provide SEO solutions to 100+ clients, from different countries like: US, UK, China, India. To know more details about the services please go through our website: http://www.indian-seo.com.