Mastering Xcode Develop and Design Joshua Nozzi Mastering Xcode Develop and Design Joshua Nozzi Mastering Xcode 4: Develop and Design Joshua Nozzi Peachpit Press 1249 Eighth Street Berkeley, CA 94710 510/524-2178 510/524-2221 (fax) Find us on the Web at: www.peachpit.com To report errors, please send a note to errata@peachpit.com Peachpit Press is a division of Pearson Education Copyright © 2012 by Joshua Nozzi Editor: Cliff Colby Production editor: Myrna Vladic Development editor: Kim Wimpsett and Robyn G Thomas Copyeditor: Scout Festa Technical Editor: Duncan Campbell Cover design: Aren Howell Straiger Interior design: Mimi Heft Compositor: David Van Ness Indexer: Ann Rogers Notice of Rights All rights reserved No part of this book may be reproduced or transmitted in any form by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher For information on getting permission for reprints and excerpts, contact permissions@peachpit.com Notice of Liability The information in this book is distributed on an “As Is” basis, without warranty While every precaution has been taken in the preparation of the book, neither the author nor Peachpit Press shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the instructions contained in this book or by the computer software and hardware products described in it Trademarks Xcode is a trademark of Apple Inc., registered in the United States and other countries Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks Where those designations appear in this book, and Peachpit Press was aware of a trademark claim, the designations appear as requested by the owner of the trademark All other product names and services identified throughout this book are used in editorial fashion only and for the benefit of such companies with no intention of infringement of the trademark No such use, or the use of any trade name, is intended to convey endorsement or other affiliation with this book ISBN 13: 978-0-321-76752-3 ISBN 10: 0-321-76752-7 Printed and bound in the United States of America Thanks to all my peers, friends, and family for their enthusiastic support, to a great team of professionals for helping me reach this goal, and to Matt for putting up with yet another of my time-consuming projects Acknowledgments I wish to thank the following people whose work I used while writing this book CyRIl GODEfROy Cyril’s masterfully broken code examples demonstrated some nice highlights of the Clang Static Analyzer You can find them at http://xcodebook.com/cgodefroy COlIN WhEElER Colin’s Xcode shortcut cheat sheet saved me loads of tedium when creating Appendix B You can find the original, downloadable version that Colin maintains at http://xcodebook.com/cwheeler iv MASTERING XCODE Third-pArTy resOUrces Stack Overflow (http://stackoverflow.com/questions/tagged/xcode) Stack Overflow is a great developer resource with questions tagged by topic Questions and answers are voted up or down depending on their clarity and usefulness, encouraging thoughtful questions and answers by community members CocoaDev Wiki (http://cocoadev.com) Although somewhat dated, this community-built wiki was pumped full of useful Cocoa developer information over the course of the last decade and still contains many valuable lessons for beginner, intermediate, and expert developers Cocoa Dev Central (http://cocoadevcentral.com) This celebrated collection of informative how-to articles contains many Cocoa developer favorites It’s worth browsing thirD-PartY reSourceS D-39 Join the PeachPit AffiliAte teAm! You love our books and you love to share them with your colleagues and friends why not earn some $$ doing it! If you have a website, blog or even a Facebook page, you can start earning money by putting a Peachpit link on your page If a visitor clicks on that link and purchases something on peachpit.com, you earn commissions* on all sales! Every sale you bring to our site will earn you a commission All you have to is post an ad and we’ll take care of the rest ApplY And get stArted! It’s quick and easy to apply To learn more go to: http://www.peachpit.com/affiliates/ *Valid for all books, eBooks and video sales at www.Peachpit.com