O'Reilly logo

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

Objective-C Quick Syntax Reference

Book Description

The Objective-C Quick Syntax Reference is a condensed code and syntax reference to the popular Objective-C programming language, which is the core language behind the APIs found in the Apple iOS and Mac OS SDKs. It presents the essential Objective-C syntax in a well-organized format that can be used as a handy reference.

You won't find any technical jargon, bloated samples, drawn out history lessons, or witty stories in this book. What you will find is a language reference that is concise, to the point and highly accessible. The book is packed with useful information and is a must-have for any Objective-C programmer.

In the Objective-C Quick Syntax Reference, you will find:

  • A concise reference to the Objective-C language syntax.

  • Short, simple, and focused code examples.

  • A well laid out table of contents and a comprehensive index allowing easy review.

What you'll learn

  • How to create an Objective-C HelloWorld

  • How to compile and run

  • What are the Objective-C code class definitions

  • How to use objects in Objective-C

  • How to effectively use categories to extend the various classes

  • What is key-value observation

  • How to archive an object graph

  • How to implement the delegation design pattern with protocols

  • How to master code blocks and much more

Who this book is for

This book is a quick, handy pocket syntax reference for experienced Objective-C, Mac, and iOS programmers, and a concise, easily-digested introduction for other programmers new to Objective-C.

Table of Contents

  1. Title Page
  2. Dedication
  3. Contents at a Glance
  4. Contents
  5. About the Author
  6. About the Technical Reviewer
  7. Introduction
  8. CHAPTER 1: Hello World
    1. Xcode
    2. Creating a New Project
    3. Hello World
    4. Code Comments
    5. Build and Run
    6. Where to Get More Information
  9. CHAPTER 2: Build and Run
    1. Compiling
    2. Building
    3. Build and Run
  10. CHAPTER 3: Variables
    1. Variables Defined
  11. CHAPTER 4: Operators
    1. Operators Defined
  12. CHAPTER 5: Objects
    1. Objects Defined
  13. CHAPTER 6: Strings
    1. NSString
    2. NSMutableString
  14. CHAPTER 7: Numbers
    1. NSNumber
  15. CHAPTER 8: Arrays
    1. NSArray
    2. NSMutableArray
  16. CHAPTER 9: Dictionaries
    1. NSDictionary
    2. NSMutableDictionary
  17. CHAPTER 10: For Loops
    1. For Loops Defined
  18. CHAPTER 11: While Loops
    1. While Loops Defined
  19. CHAPTER 12: Do While Loops
    1. Do While Loops Defined
  20. CHAPTER 13: For-Each Loops
    1. For-Each Loops Defined
  21. CHAPTER 14: If Statements
    1. If Statements Defined
  22. CHAPTER 15: Switch Statements
    1. Switch Statements Defined
  23. CHAPTER 16: Defining Classes
    1. Classes
    2. Class Interfaces
    3. Implementing Classes
  24. CHAPTER 17: Class Methods
    1. Class Methods Defined
  25. CHAPTER 18: Inheritance
    1. Creating Subclasses
    2. Extending Classes
    3. Overriding Methods
  26. CHAPTER 19: Categories
    1. Categories Defined
  27. CHAPTER 20: Blocks
    1. Blocks Defined
  28. CHAPTER 21: Key-Value Coding
    1. Key-Value Coding Defined
  29. CHAPTER 22: Key-Value Observation
    1. Key-Value Observation Defined
    2. Project and Task Object Graph
    3. Implementing Key-Value Observation
    4. Add the Observer
  30. CHAPTER 23: Protocols
    1. Protocols Overview
  31. CHAPTER 24: Delegation
    1. Delegation Defined
  32. CHAPTER 25: Singleton
    1. Singleton Defined
  33. CHAPTER 26: Error Handling
    1. Error Handling Defined
  34. CHAPTER 27: Background Processing
    1. Background Processing Defined
  35. CHAPTER 28: Object Archiving
    1. Object Archiving Defined
  36. CHAPTER 29: Web Services
    1. Web Services Defined
  37. Index