iPhone Programming Tutorial

pencil

This tutorial is designed to give you a jump-start in learning iPhone programming. You will get an overview of the programming languages, frameworks and tools that you will need to know to succeed in iPhone programming.

Tools: Mac, XCode & Interface Builder

Before you do anything else, you must have access to a Mac running OSX. You will need a newer Mac that is Intel based and it is best to have the latest version of OSX (the operating system for Mac computers).

Once you have your Mac in place you may sign up for the Apple Developer Program by pointing your browser to http://developer.apple.com. The initial signup is free and you can download the tools at no cost. However, if you want to see your apps on your own iPhone or want to sell your work on the Apple App Store then you will need to pay a $99 fee.

Finally, once you have signed up for the Apple Developer program you can download the primary tools that will need to learn how to program on the iPhone: XCode and Interface Builder. XCode is the IDE for iPhone development and is where you will edit your iPhone code and keep your app software projects organized. Interface Builder is a point and click program that you can use to build a GUI for your iPhone without touching code at all.

iPhone Programming Languages

iPhone programming requires you to use one or more of the following programming languages: C, C++ and Objective-C. C is the plain old programming language used in many software systems and is primarily used to work with the low level operating system functions in iPhone OS. C++ is used in games and to leverage code from other platforms in iPhone OS. Finally, Objective-C is where you will be spending 90% of your time when doing iPhone Programming. Objective-C is the object oriented programming language used to work with the majority of iPhone components.

Example of iPhone Programming Code:

UILabel *label label = [[UILabel alloc] init];
label.frame = CGRectMake(10, 10, 300, 40);
label.textAlignment = UITextAlignmentCenter;
label.text = @"Press Button";
[self.view addSubview:label];
[label release];

The code above will create a label with the text “Press Button” and add it to the current view.

iPhone Development Frameworks

The primary framework that you will use with iPhone Programming is the Cocoa-Touch framework. This is analogous to the Cocoa framework for Mac and is used to create the buttons, labels, sliders and so on that appear on the iPhone. Programmers will generally refer to other foundational frameworks such as NSFoundation as part of Cocoa-Touch.

Cocoa-Touch is the framework that you will be using 90% of the time in iPhone programming. This is how you get the iPhone to do things like: display windows and views, date pickers, sliders, navigation buttons to move from screen to screen and so on.

That’s a Wrap for Now

This is a very high level view of what you need to get started with iPhone Programming. To get a bit more into the nitty gritty of Objective-C (the programming language you will spend most of your time working with) check out our Objective-C Tutorial.

{ 1 trackback }

Tutorial : Les bases de la programmation en Objective-C | Romain Boulay . Ingénieur développement informatique mobile
January 15, 2010 at 9:09 am

{ 0 comments… add one now }

Leave a Comment