background preloader

Apple Dev

Facebook Twitter

Mobl. Iphone -- TUAW. Learning Objective-C: A Primer. Objective-C is the primary programming language you use when writing software for OS X and iOS. It’s a superset of the C programming language and provides object-oriented capabilities and a dynamic runtime. Objective-C inherits the syntax, primitive types, and flow control statements of C and adds syntax for defining classes and methods. It also adds language-level support for object graph management and object literals while providing dynamic typing and binding, deferring many responsibilities until runtime.

At a Glance This document introduces the Objective-C language and offers extensive examples of its use. An App Is Built from a Network of Objects When building apps for OS X or iOS, you’ll spend most of your time working with objects. If you’re writing your own class, start by providing a description of the class that details the intended public interface to instances of the class.

Categories Extend Existing Classes Protocols Define Messaging Contracts Blocks Simplify Common Tasks. iOS Dev Center. Official Forum for Programming in Objective-C 2.0 (the iPhone Programming Language) - Stephen Kochan - Index. Coding in Objective-C 2.0. About this Screencast After watching these video tutorials, you’ll be more confident to start writing high-quality iPhone and Mac applications. You’ll not just know how to write code, you’ll also understand why it works. You’ll feel more comfortable with the Objective-C syntax and object-oriented programming in general. You’ll also be able to manage memory wisely and diagnose common memory problems. Watch a free sampler movie of this screencast series Contents and Extracts In addition to the videos, you can also download the source code for each episode so you can follow along and experiment on your own. Episode 1: Classes, Objects, and Messages (59 minutes) In this episode, we’ll write a small program in Xcode to learn the basics of object-oriented programming with Objective-C.

If you’ve purchased an episode in this series, and your account is configured to receive e-mail announcements from us, we’ll send you an e-mail when new episodes are released. Audience. Cocoa Dev Central: Learn Objective-C. Objective-C Objective-C is the primary language used to write Mac software. If you're comfortable with basic object-oriented concepts and the C language, Objective-C will make a lot of sense.

If you don't know C, you should read the C Tutorial first. This tutorial is written and illustrated by Scott Stevenson Copyright © 2008 Scott Stevenson Calling Methods To get started as quickly as possible, let's look at some simple examples. [object method]; [object methodWithInput:input]; Methods can return a value: output = [object methodWithOutput]; output = [object methodWithInputAndOutput:input]; You can call methods on classes too, which is how you create objects. Id myObject = [NSString string]; The id type means that the myObject variable can refer to any kind of object, so the actual class and the methods it implements aren't known when you compile the app.

In this example, it's obvious the object type will be an NSString, so we can change the type: NSString* myString = [NSString string]; Accessors. Programming With Cocoa. The Cocoa programming environment is used to create native Mac OS X applications. Mac DevCenter features a variety of tutorials covering Cocoa. If you're just getting started and don't have an extensive background in "C," then start with Seth Roby's "C is for Cocoa" tutorial. As you become more comfortable in this environment, try some of Mike Beam's more advanced lessons.

New tutorials are constantly being added, so be sure to check back regularly. Understanding the NSTableView Class This article will provide you with an in-depth introduction on how to use the NSTableView Cocoa class to display tabular data. You will first learn how to add an instance of that class to your application project using Interface Builder. Inside StYNCies, Part 2 In the first part of this two-part series, Matthew Russell showed you how to develop a user interface that lives up in your menubar like the system clock.

Inside StYNCies Stickies is one of the handiest little apps out there. What's Your Function?