Note: Supplemental materials are not guaranteed with Rental or Used book purchases.
Purchase Benefits
Dedication
Acknowledgements
About the Author
Preface
Part I: Introduction to Objective-C
Chapter 1: C, The Foundation of Objective-C
The Structure of a C Program
Variables
Operators
Expressions and Statements
Program Flow
Preprocessor
Command Line Compiling and Debugging
Summary
Exercises
Chapter 2: More About C Variables
Memory Layout of a C Program
Automatic Variables
External Variables
Declaration Keywords
Scope
Dynamic Allocation
Summary
Exercises
Chapter 3: An Introduction to Object-Oriented Programming
Object-Oriented Programming
An Introduction to Objective-C
Objective-C Additions
Summary
Chapter 4: Your First Objective-C Program
Building with Xcode
Objective-C Program Structure
An Object-Oriented Hello World
main.m
Summary
Exercises
Part II: Language Basics
Chapter 5: Messaging
Methods
Messaging
Messaging Details
Under the Hood
Message Forwarding
Efficiency
Introspection and Other Runtime Fun
Summary
Exercises
Chapter 6: Classes and Objects
Defining a Class
Subclassing a Class
Creating Objects
Destroying Objects
Copying Objects
Summary
Exercises
Chapter 7: The Class Object
Class Objects
Other Class Methods
Mimicking Class Variables
Summary
Exercises
Chapter 8: Frameworks
What Is a Framework?
Cocoa And Cocoa Touch
AppKit
UIKit
Core Foundation
Core Graphics
Core Animation
Other Apple-Supplied Frameworks
Third-Party Frameworks
Under the Hood
Summary
Chapter 9: Common Foundation Classes
Immutable and Mutable Classes
Class Clusters
NSString
Collection Classes
NSNumber
NSNull
NSData
NSURL
Objective-C Literals and Object Subscripting
Structures
Geometry Structures on iOS
Summary
Exercises
Chapter 10: Control Structures in Objective C
if Statements
for Statements and Implicit Loops
while Statements and NSEnumerator
Fast Enumeration
An Example Using Fast Enumeration
Exceptions
Summary
Exercises
Chapter 11: Categories, Extensions, and Security
Categories
Associative References
Extensions
Hiding your Instance Variable Declarations
Instance Variable Scope (Access Control)
Access Control for Methods
Namespaces
Security
Calling C Functions from Objective-C
Summary
Exercises
Chapter 12: Properties
Accessing Instance Variables Outside of an Object (Don’t Do It)
Declaring and Implementing Accessors
Accessors Using Properties
Synthesized Instance Variables
@synthesize by Default
Synthesis Summary
Private Properties
The @property Statement
More About @dynamic
Properties without Instance Variables
Properties and Memory Management
A Look Ahead at Automatic Reference Counting (ARC)
Subclassing and Properties
Hidden Setters for readonly Properties
Properties as Documentation
Dot Syntax
Summary
Exercises
Chapter 13: Protocols
Protocols
Using Protocols
TablePrinter Example
Protocol Objects and Testing for Conformance
Summary
Exercises
Part III: Advanced Concepts
Chapter 14: Memory Management Overview
The Problem
The Solutions: Objective-C Memory Management
Onward
Chapter 15: Reference Counting
Reference Counting Basics
Receiving Objects
Ownership
dealloc
Returning Objects
retainCount
Multithreading
When Retain Counts Go Bad
Retain Cycles
The Final Goodbye: When Programs Terminate
Summary
Exercises
Chapter 16: ARC
What ARC is and is not
How ARC Works
ARC Imposes Some Rules
New Variable Qualifiers
Properties
Retain Cycles
ARC and Core Foundation
Casting to and from void*
ARC and Extra Autorelease Pools
ARC and Exceptions
Using ARC
ARC uses runtime functions
More Information
Summary
Exercises
Chapter 17: Blocks
Function Pointers
The Trouble with Function Pointers
NSInvocation
Blocks
Some Philosophical Reservations
Summary
Exercises
Chapter 18: A Few More Things
Enums with a Fixed Underlying Type
Forward Declarations of Methods in the @implementation Block Are No Longer Needed
Some New Documentation
Summary
Exercises
Part IV: Appendices
Appendix A: Reserved Words and Compiler Directives
Appendix B: Toll-Free Bridged Classes
Appendix C: 32- and 64-bit
Appendix D: The Fragile Base Class Problem
Appendix E: Resources for Objective -C
Index
The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.
The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.