Skip to Content
Cocoa® Programming for Mac OS® X For Dummies®
book

Cocoa® Programming for Mac OS® X For Dummies®

by Erick Tejkowski
February 2009
Beginner content levelBeginner
408 pages
7h 53m
English
For Dummies
Content preview from Cocoa® Programming for Mac OS® X For Dummies®

Chapter 6. The Basics of Objective-C

In This Chapter

  • Using object-oriented programming

  • Knowing the differences among classes, variables, and methods

  • Understanding and coding in Objective-C

  • Using your own classes

Objective-C is the language that most developers use to program Cocoa applications. Although it's not the only language that you can use for Cocoa development, it's by far the most popular. Objective-C is a superset of the popular C programming language that bears an uncanny resemblance to SmallTalk (which is no accident). If you're an experienced C programmer already, you'll find that Objective-C makes you feel like you're in familiar surroundings, with a few language oddities thrown in. If you aren't well versed in C but know another programming language, you can probably figure out what's going on anyway.

This chapter examines the basics of object-oriented programming and the Objective-C language. After you get the hang of how Objective-C works, the chapter helps solidify your skills by building a project and using Objective-C. In the process, you find out how to create objects in code. Next, the chapter runs you through another important topic in Objective-C: class methods. The chapter concludes with a look at the way you should name things in Objective-C. Naming schemes plays an important role in Objective-C. As you can see, this chapter is a collection of several small facts. These bits of knowledge form a larger body of information that you'll use every time you program ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Cocoa Programming for OS X: The Big Nerd Ranch Guide

Cocoa Programming for OS X: The Big Nerd Ranch Guide

Aaron Hillegass, Adam Preble, Nate Chandler
Learning Cocoa with Objective-C, 2nd Edition

Learning Cocoa with Objective-C, 2nd Edition

Apple Computer Inc, James Duncan Davidson
Learning Cocoa with Objective-C, 4th Edition

Learning Cocoa with Objective-C, 4th Edition

Paris Buttfield-Addison, Jonathon Manning, Tim Nugent

Publisher Resources

ISBN: 9780470432891Purchase book