C
Crash Course in Objective-C
Objective-C is an object-oriented programming language used by Apple primarily for programming Mac OS X and iOS applications. It is an extension to the standard ANSI C language and hence it should be an easy language to pick up if you are already familiar with the C programming language. This appendix assumes that you already have some background in C programming and focuses on the object-oriented aspects of the language. If you are coming from a Java or .NET background, many of the concepts should be familiar to you; you just have to understand the syntax of Objective-C and, in particular, pay attention to the section on memory management.
Objective-C source code files are contained in two types of files:
- .h — header files
- .m — implementation files
For the discussions that follow, assume that you have created a Single View Application project using Xcode named LearningObjC and added an empty NSObject class named SomeClass to your project (see Figure C-1).

FIGURE C-1
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.
Read now
Unlock full access