Developers Library
ESSENTIAL REFERENCES FOR PROGRAMMING PROFESSIONALS
Developers Library books are designed to provide practicing programmers with unique, high-quality references and tutorials on the programming languages and technologies they use in their daily work.
All books in the Developers Library are written by expert technology practitioners who are especially skilled at organizing and presenting information in a way thats useful for other programmers.
Key titles include some of the best, most widely acclaimed books within their topic areas:
PHP & MySQL Web Development
Luke Welling & Laura Thomson
ISBN 978-0-672-32916-6
MySQL
Paul DuBois
ISBN-13: 978-0-672-32938-8
Linux Kernel Development
Robert Love
ISBN-13: 978-0-672-32946-3
Python Essential Reference
David Beazley
ISBN-13: 978-0-672-32978-4
PostgreSQL
Korry Douglas
ISBN-13: 978-0-672-32756-2
C++ Primer Plus
Stephen Prata
ISBN-13: 978-0321-77640-2
Developers Library books are available in print and in electronic formats at most retail and online bookstores, as well as by subscription from Safari Books Online at safari.informit.com
Developers
Library
informit.com/devlibrary
Programming in Objective-C
Fourth Edition
Stephen G. Kochan
Upper Saddle River, NJ Boston Indianapolis San FranciscoNew York Toronto Montreal London Munich Paris MadridCape Town Sydney Tokyo Singapore Mexico City
Programming in Objective-C, Fourth Edition
Copyright 2012 by Pearson Education, Inc.
All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Nor is any liability assumed for damages resulting from the use of the information contained herein.
ISBN-13: 978-0-321-81190-5
ISBN-10: 0-321-81190-9
Library of Congress Cataloging-in-Publication Data is on file.
Printed in the United States of America
First Printing, December 2011
Acquisitions Editor
Mark Taber
Development Editor
Michael Thurston
Managing Editor
Sandra Schroeder
Project Editor
Mandie Frank
Indexer
xxx
Proofreader
Sheri Cain
Technical Editors
Wendy Mui
Michael Trent
Publishing Coordinator
Vanessa Evans
Designer
Gary Adair
Compositor
Mark Shirar
Trademarks
All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Pearson cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark.
Warning and Disclaimer
Every effort has been made to make this book as complete and as accurate as possible, but no warranty or fitness is implied. The information provided is on an as is basis. The author and the publisher shall have neither liability nor responsibility to any person or entity with respect to any loss or damages arising from the information contained in this book.
Bulk Sales
Pearson offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales. For more information, please contact
U.S. Corporate and Government Sales
1-800-382-3419
For sales outside of the U.S., please contact
International Sales
To Roy and Ve, two people whom I dearly miss
To Ken Brown, Its just a jump to the left.
Contents at a Glance
Index
About the Author
Stephen Kochan is the author and coauthor of several bestselling titles on the C language, including Programming in C (Sams, 2004), Programming in ANSI C (Sams, 1994), and Topics in C Programming (Wiley, 1991), and several Unix titles, including Exploring the Unix System (Sams, 1992) and Unix Shell Programming (Sams, 2003). He has been programming on Macintosh computers since the introduction of the first Mac in 1984, and he wrote Programming C for the Mac as part of the Apple Press Library. In 2003 Kochan wrote Programming in Objective-C (Sams, 2003), and followed that with another Mac-related title, Beginning AppleScript (Wiley, 2004).
About the Technical Reviewers
Wendy Mui is a programmer and software development manager in the San Francisco Bay Area. After learning Objective-C from the second edition of Steve Kochans book, she landed a job at Bump Technologies, where she put her programming skills to good use working on the client app and the API/SDK for Bumps third-party developers. Prior to her iOS experience, Wendy spent her formative years at Sun and various other tech companies in Silicon Valley and San Francisco. She got hooked on programming while earning a B.A. in Mathematics from University of California Berkeley. When not working, Wendy is pursuing her 4th Dan Tae Kwon Do black belt.
Michael Trent has been programming in Objective-C since 1997and programming Macs since well before that. He is a regular contributor to Steven Franks www.cocoadev.com website, a technical reviewer for numerous books and magazine articles, and an occasional dabbler in Mac OS X open-source projects. Currently, he is using Objective-C and Apple Computers Cocoa frameworks to build professional video applications for Mac OS X. Michael holds a Bachelor of Science degree in computer science and a Bachelor of Arts degree in music from Beloit College of Beloit, Wisconsin. He lives in Santa Clara, California, with his lovely wife, Angela.
We Want to Hear from You!
As the reader of this book, you are our most important critic and commentator. We value your opinion and want to know what were doing right, what we could do better, what areas youd like to see us publish in, and any other words of wisdom youre willing to pass our way.
You can email or write directly to let us know what you did or didnt like about this bookas well as what we can do to make our books stronger.
Please note that we cannot help you with technical problems related to the topic of this book, and that due to the high volume of mail we receive, we might not be able to reply to every message.
When you write, please be sure to include this books title and author, as well as your name and phone or email address.
E-mail:
Mail: Reader Feedback
Addison-Wesley Developers Library
800 East 96th Street
Indianapolis, IN 46240 USA
Reader Services
Visit our website and register this book at www.informit.com/register for convenient access to any updates, downloads, or errata that might be available for this book.