Objective-C Fundamentals
Christopher K. Fairbairn, Johannes Fahrenkrug, and Collin Ruffenach
  • September 2011
  • ISBN 9781935182535
  • 368 pages

A handy and complete reference.

Glenn Stokol, Oracle Corporation

Objective-C Fundamentals is a hands-on tutorial that leads you from your first line of Objective-C code through the process of building native apps for the iPhone using the latest version of the SDK. You'll learn to avoid the most common pitfalls, while exploring the expressive Objective-C language through numerous example projects.

About the Technology

The iPhone is a sophisticated device, and mastering the Objective C language is the key to unlocking its awesome potential as a mobile computing platform. Objective C's concise, rich syntax and feature set, when matched with the iPhone SDK and the powerful XCode environment, offers a developers from any background a smooth transition into mobile app development for the iPhone.

About the book

Objective-C Fundamentals guides you gradually from your first line of Objective-C code through the process of building native apps for the iPhone. Starting with chapter one, you'll dive into iPhone development by building a simple game that you can run immediately. You'll use tools like Xcode 4 and the debugger that will help you become a more efficient programmer. By working through numerous easy-to-follow examples, you'll learn practical techniques and patterns you can use to create solid and stable apps. And you'll find out how to avoid the most common pitfalls.

Table of Contents detailed table of contents



about this book

author online

about the cover illustration

Part 1 Getting started with Objective-C

1. Building your first iOS application

1.1. Introducing the iOS development tools

1.2. Adjusting your expectations

1.3. Using Xcode to develop a simple Coin Toss game

1.4. Hooking up the user interface

1.5. Compiling the Coin Toss game

1.6. Taking Coin Toss for a test run

1.7. Summary

2. Data types, variables, and constants

2.1. Introducing the Rental Manager application

2.2. The basic data types

2.3. Displaying and converting values

2.4. Creating your own data types

2.5. Completing Rental Manager v1.0, App Store here we come!

2.6. Summary

3. An introduction to objects

3.1. A whirlwind tour of object-oriented programming concepts

3.2. The missing data type: id

3.3. Pointers and the difference between reference and value types

3.4. Communicating with objects

3.5. Strings

3.6. Sample application

3.7. Summary

4. Storing data in collections

4.1. Arrays

4.2. Dictionaries

4.3. Boxing

4.4. Making the Rental Manager application data driven

4.5. Summary

Part 2 Building your own objects

5. Creating classes

5.1. Building custom classes

5.2. Declaring the interface of a class

5.3. Providing an implementation for a class

5.4. Declared properties

5.5. Creating and destroying objects

5.6. Using the class in the Rental Manager application

5.7. Summary

6. Extending classes

6.1. Subclassing

6.2. Adding new instance variables

6.3. Accessing existing instance variables

6.4. Overriding methods

6.5. Class clusters

6.6. Categories

6.7. Subclassing in your demo application

6.8. Summary

7. Protocols

7.1. Defining a protocol

7.2. Implementing a protocol

7.3. Important protocols

7.4. Summary

8. Dynamic typing and runtime type information

8.1. Static vs. dynamic typing

8.2. Dynamic binding

8.3. How messaging works

8.4. Runtime type information

8.5. Practical uses of runtime type introspection

8.6. Summary

9. Memory management

9.1. Object ownership

9.2. Reference counting

9.3. Autorelease pools

9.4. Memory zones

9.5. Rules for object ownership

9.6. Responding to low-memory warnings

9.7. Summary

Part 3 Making maximum use of framework functionality

10. Error and exception handling

10.1. NSError — handling errors the Cocoa way

10.2. Creating NSError objects

10.3. Exceptions

10.4. Summary

11. Key-Value Coding and NSPredicate

11.1. Making your objects KVC-compliant

11.2. Handling special cases

11.3. Filtering and matching with predicates

11.4. Sample application

11.5. Summary

12. Reading and writing application data

12.1. Core Data history

12.2. Core Data objects

12.3. Core Data resources

12.4. Building the PocketTasks application

12.5. Beyond the basics

12.6. Summary

13. Blocks and Grand Central Dispatch

13.1. The syntax of blocks

13.2. Performing work asynchronously

13.3. Summary

14. Debugging techniques

14.1. Building an application, complete with bugs

14.2. Understanding NSLog

14.3. Bringing memory leaks under control with Instruments

14.4. Detecting zombies

14.5. Summary

Appendix A: Installing the iOS SDK

Appendix B: Configuring Liferay Portal with MySQL database

Appendix C: The basics of C

Appendix D: Alternatives to Objective-C


What's inside

  • Objective-C from the ground up
  • Developing with Xcode 4
  • Examples that work unmodified on iPhone

About the reader

No iOS or mobile experience is required to benefit from this book but familiarity with programming in general is helpful.

About the authors

Christopher Fairbairn, Johannes Fahrenkrug, and Collin Ruffenach are professional mobile app developers, each with over a decade of experience using different systems including iOS, Palm, Windows Mobile, and Java.

placing your order...

Don't refresh or navigate away from the page.
eBook $28.79 $35.99 3 formats + liveBook
Objective-C Fundamentals (eBook) added to cart
continue shopping
go to cart

Prices displayed in rupees will be charged in USD when you check out.
customers also reading

This book 1-hop 2-hops 3-hops

FREE domestic shipping on three or more pBooks