When writing Objective-C code, you should keep in mind a number of established coding conventions. Method names, for example, start with a lowercase letter and use camel case for multiple words; for example, doSomething or doSomethingElse.
In addition, there are a few conventions that are required if you wish to take advantage of language or framework features.
Additionally, you should become familiar with Xcode before trying to follow the exercises at the end of most chapters in this document. If you have knowledge of another higher-level programming language, such as Ruby or Python, you should be able to follow the content. Reasonable coverage is given to general object-oriented programming principles, particularly as they apply in the context of Objective-C, but it is assumed that you have at least a minimal familiarity with basic object-oriented concepts.
The content in this document applies to Xcode 4. For more information about Xcode, see Xcode Overview. Objective-C apps use reference counting to determine the lifetime of objects. In addition to the compiler, the Objective-C language uses a runtime system to enable its dynamic and object-oriented features.
All Rights Reserved. Terms of Use Privacy Policy Updated: To submit a product bug or enhancement request, please visit the Bug Reporter page. Documentation Archive Developer Search. See Also The content in this document applies to Xcode 4.
Sending feedback…. Please try submitting your feedback later. Thank you for providing feedback! Your input helps improve our developer documentation. How helpful is this document? Objects, Classes, and Messaging. Defining a Class. Declared Properties. Categories and Extensions. Associative References. Fast Enumeration. Enabling Static Behavior. Exception Handling. A glossary at the end of this document provides definitions of terms specific to Objective-C and object-oriented programming.
This document makes special use of computer voice and italic fonts. Computer voice denotes words or characters that are to be taken literally typed as they appear.
Italic denotes words that represent something else or can be varied. For example, the syntax:. Where example code is shown, ellipsis points indicates the parts, often substantial parts, that have been omitted:. If you have never used object-oriented programming to create applications, you should read Object-Oriented Programming with Objective-C. Object-Oriented Programming with Objective-C is designed to help you become familiar with object-oriented development from the perspective of an Objective-C developer.
It spells out some of the implications of object-oriented design and gives you a flavor of what writing an object-oriented program is really like.
0コメント