Developing on iPhone (3): our first application (I)

Author: jack // Category:
In our previous article we had installed the iPhone SDK and had downloaded, compiled and tested a basic example released by Apple. We must now begin to develop, step by step from scratch, a similar application. 
We realize that this is beginning to be the hard part, so let's make a short introduction. As we have said, it is almost essential to have some knowledge of programming in order to understand thoroughly how to develop an application for iPhone. It should be borne in mind that is playing an important number of different materials: 
Design patterns: Business Delegate, MVC (Model View Controller) ... are present in the app easier. 
Programming language Objective-C 
Cocoa 
Frameworks specific development: UIKit, Foundation 
Tools: XCode, Interface Builder, iPhone Simulator ... 
The problem is that if we start by explaining in depth each of these subjects before beginning to develop, the discouragement would logically important. For this series of articles have considered more practical to start directly with development on the SDK, and be giving strokes of each of these issues on the fly. However, before we begin to develop, we leave you some links to documentation of interest: 
iPhone Reference Library (here you can find articles, books ...), and specific guidelines. 
The Objective-C Programming Language 2.0. The reference base of the programming language used to program our applications. It is almost essential to go known ... I have also found a book in Castilian programming for C and Java programmers. 
Cocoa Fundamentals Guide: A comprehensive guide to Cocoa, where he spoke of UIKit, Foundation, etc.. 
iPhone Development Guide: a brief guide development for iPhone 
Your First iPhone Application: tutorial step by step in creating an application 'HelloWorld' (more comprehensive than this, but in my view introduces too many concepts). 
In any case, our XCode IDE also has direct links to all documentation from Apple ... At the option Help -> Documentation can see that allows us to subscribe to different topics. 
Well, we started to develop. The aim will be to build an application called HelloWorld (yes), which will have a single screen. This will have a label (fixed text), a text field where you can enter information, and a button which, when clicked, will update the value of the label with what we've introduced into the text field. To do this we will perform the following steps: 
Create a project-Based View. XCode we will thus create a class that will handle our ViewController screen. We will see that in Objective-C class ViewController will consist of 2 files extension. H (interface) and. M (implementation). 
We draw the elements of the screen (interface) with Interface Builder, and learn to identify what types correspond to each element (label, text field, button) and changing their appearance, alignment, color ... 
Declare variables in the ViewController, that link to the label and text, and a method for updating the value of the label as introduced in the text box. 
Interface Builder will use to link our checks with the variables and methods created. Ie, view and link controller. 
Schedule certain behaviors and test our application. 
To not extend over this post, following directly in our open XCode and start with Step 1.



0 Responses to "Developing on iPhone (3): our first application (I)"

Post a Comment