Contents

About the Author

About the Technical Reviewer

Acknowledgments

Introduction

images Chapter 1: Getting Started

Introduction

Apple Objective-C Platform

Why Objective-C?

Developing a Simple Objective-C Program

Creating the Project

Completing Your Test Drive

Roundup

images Chapter 2: Using Classes

Developing Your First Class

Adding a Class to the Project

Coding the Atom Class Interface

Coding the Atom Class Implementation

Instance Variables

Instance Variable Access

Declaring Instance Variables

Accessing Instance Variables

Properties

Property Declaration

Property Definition

Property-Backed Instance Variables

Property Access

Methods

Syntax

Invoking Methods

Protocol

Syntax

Category

Extensions

Roundup

images Chapter 3: Objects and Messaging

Creating Objects

Object Initialization

Extending the Elements Project

Message Dispatch

Message Forwarding

Forwarding Options

Adding Fast Forwarding to the Hydrogen Class

Roundup

images Chapter 4: Memory Management

Program Memory Usage

Objective-C Memory Model

Implementing Manual Retain-Release

Object Reference and Object Ownership

Basic Memory Management Rules

Using MRR

Using Automatic Reference Counting

Rules and Conventions for Using ARC

ARC Lifetime Qualifiers

Using ARC

Avoiding Circular References

Roundup

images Chapter 5: The Preprocessor

Overview

Operations

Preprocessor Language

Directives

Macros

Roundup

images Chapter 6: Expert Section Using ARC

ARC and Object Ownership

Claiming Ownership Interest in Objects

Releasing Ownership Interest in Objects

Creating Multiple Order Entries

Using ARC with Apple Frameworks and Services

Objective-C Toll Free Bridging

ARC Bridged Casts

Using ARC Bridged Casts

Roundup

images Chapter 7: Runtime System

Dynamic Features

Object Messaging

Selectors

Method Signatures

Using Object Messaging

Dynamic Typing

Dynamic Binding

Dynamic Method Resolution

Providing a Method Implementation Dynamically

Dynamic Loading

Introspection

Roundup

images Chapter 8: Runtime Architecture

Runtime Components

Compiler

Runtime Library

Interacting with the Runtime

NSObject Runtime Methods

Performing Object Introspection

Roundup

images Chapter 9: Expert Section: Using the Runtime APIs

Extending a Program with Loadable Bundles

Approach

Step 1: Laying the Foundation

Step 2: Creating a Loadable Bundle

Step 3: Dynamically Loading the Bundle

Using the Runtime APIs

Defining a Method Implementation

Creating and Registering a Class

Creating a Class Instance

Dynamically Adding a Variable to a Class Instance

Creating a Dynamic Proxy

Creating the Invoker Protocol

Coding the Proxy Class

Testing the AspectProxy

Roundup

images Chapter 10: Foundation Framework General Purpose Classes

Root Classes

NSObject Protocol

NSObject

NSProxy

Strings

NSString

NSAttributedString

NSString Literals

Format Strings

Value Objects

NSValue

NSNumber

NSDecimalNumber

NSNumber Literals

Date and Time Support

NSCache

Collections

NSArray

NSPointerArray

NSDictionary

NSMapTable

NSSet

NSCountedSet

NSHashTable

NSPointerFunctions

XML Processing

XML DTD Processing

Tree-Based XML Processing

Event-Driven XML Processing

Predicates

Roundup

images Chapter 11: Foundation Framework System Services

Network Services

NSHost

Bonjour Network Services

Application Services

Regular Expressions and Text Processing

File System Utilities

Application Bundles

File Management

Stream Input-Output

Metadata Queries

Concurrency and Threading

Thread Management

Concurrent Operations

Locking

Timers and Run Loops

Creating a Bonjour Network Service Client

URL Handling

URL Loading

Cache Management

Downloading a Resource with the URL Loading APIs

Authentication and Credentials Management

Cookie Management

Protocol Support

Interprocess Communication

Communication via Pipes

Communication via Ports

Port Registration

Roundup

images Chapter 12: Foundation Framework Specialized Services

Notifications

Archives and Serialization

Archiving

Property List Serialization

Archiving an Object Graph

Distributed Objects

Scripting

Roundup

images Chapter 13: Foundation Functions and Data Types

Foundation Functions

Assertions

Logging

Bundles

Decimal Numbers and Byte Ordering

Interacting with the Runtime

File Paths

Geometry

Data Types

Constants

Roundup

images Chapter 14: Expert Section: Error Handling

Runtime Error Conditions

Assertions

Error Codes

Error Objects

Exceptions

NSError

Using Error Objects

Handling Delegation Method Errors

Creating Errors Objects via Indirection

Error Recovery

Error Responders

NSError Codes

Exception Processing

NSException

Exceptions and Memory Management

Performing Exception Handling

Foundation Standard Exception Names

Error Handling Guidelines

Roundup

images Chapter 15: Blocks

Block Syntax

Blocks Are Closures!

Lexical Scope

Mutable __block Variables

Memory Management with Blocks

Using Blocks

Sorting an Array Using Blocks

Loading a URL Using Blocks

Concurrent Programming Using Blocks

Roundup

images Chapter 16: Objective-C Literals

Literals

NSNumber Literals

Container Literals

NSArray Literals

NSDictionary Literals

Expression Literals

Object Subscripting

NSArray Subscripting

NSDictionary Subscripting

Custom Subscripting

Editing Register Values Using Custom Subscripting

Roundup

images Chapter 17: Concurrent Programming

Concurrent Programming Fundamentals

Benefits of Concurrency

Implementing Concurrency

Challenges with Concurrency

Shared Data

The Problems with Locks

Message Passing

Concurrent Programming with Objective-C

Language Features

Message Passing

Threads

NSObject Threads

NSThread

Thread Synchronization

Using Threads for Concurrency

Operations and Operation Queues

Executing Operation Objects Manually

Implementing Concurrent Operations

Using Operation Queues for Concurrency

Grand Central Dispatch

Using Dispatch Queues

Choosing the Right API for Concurrent Programming

Roundup

images Chapter 18: Key-Value Programming

Key-Value Coding

Keys and Key Paths

KVC Design and Implementation

Key-Value Coding APIs

Key-Value Search Patterns

Property Accessor Naming Conventions

To-Many Property Accessor Naming Conventions

Key-Value Validation

Key-Value Coding Collection Operators

Key-Value Observing

Key-Value Observing or Notifications

Key-Value Observing APIs

KVO Design and Implementation

Using Key-Value Programming

Roundup

images Appendix A: Language Elements

Variables

Objective-C Reserved Words

Variable Scope

Data Types

BOOL Type

Class Instance Types

Class Definition Types

Block Type

Enumeration Types

Operators

Statements

Class Elements

Instance Variables

Properties

Methods

Interface

Implementation

Protocol

Category

Class Extension

images Appendix B: Xcode Xposed!

Basic Concepts

Targets

Build Phases

Build Settings

Build Configurations

Build Rules

Creating a Configuration Settings File

Projects

Executable Environment

Workspaces

Adding an Existing Project to a Workspace

Using Static Libraries in a Workspace

Schemes

Actions

Roundup

images Appendix C: Using LLDB

LLVM Overview

LLDB

Design

LLDB Commands

Xcode LLDB Integration

Using LLDB in Xcode

Roundup

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.85.221