O'Reilly logo

Cocoa® Programming for Mac OS® X For Dummies® by Erick Tejkowski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required