How This Book is Organized
In this book, each chapter addresses one or more ideas of iOS development through discussion and
hands-on practice. For more coding practice, most chapters include challenge exercises. We
encourage you to take on at least some of these. They are excellent for firming up the concepts
introduced in the chapter and making you a more confident iOS programmer. Finally, most chapters
conclude with one or two “For the More Curious” sections that explain certain consequences of the
concepts that were introduced earlier.
Chapter 1 introduces you to iOS programming as you build and deploy a tiny application. You will
get your feet wet with Xcode and the iOS simulator along with all the steps for creating projects and
files. The chapter includes a discussion of Model-View-Controller and how it relates to iOS
development.
Chapters 2 and 3 provide an overview of Objective-C and memory management. Although you will
not create an iOS application in these two chapters, you will build and debug a tool called RandomItems
to ground you in these concepts.
In Chapters 4 and 5, you will begin focusing on the iOS user interface as you learn about views and
the view hierarchy and create an application called Hypnosister.
Chapters 6 and 7 introduce view controllers for managing user interfaces with the HypnoNerd
application. You will get practice working with views and view controllers as well as navigating
between screens using a tab bar. You will also get plenty of experience with the important design
pattern of delegation as well as working with protocols, the debugger, and setting up local
notifications.
Chapter 8 introduces the largest application in the book – Homepwner. (By the way, “Homepwner” is
not a typo; you can find the definition of “pwn” at www.urbandictionary.com.) This application keeps
a record of your possessions in case of fire or other catastrophe. Homepwner will take fourteen chapters
to complete.
In Chapters 8, 9, and 19, you will build experience with tables. You will learn about table views,
their view controllers, and their data sources. You will learn how to display data in a table, how to
allow the user to edit the table, and how to improve the interface.
Chapter 10 builds on the navigation experience gained in Chapter 6. You will learn how to use
UINavigationController and you will give Homepwner a drill-down interface and a navigation bar.
In Chapter 11, you will learn how to take pictures with the camera and how to display and store
images in Homepwner. You will use NSDictionary and UIImagePickerController.
In Chapters 12 and 13, you will set Homepwner aside for a bit to create a drawing application named
TouchTracker to learn about touch events. You will see how to add multi-touch capability and how to
use UIGestureRecognizer to respond to particular gestures. You will also get experience with the
first responder and responder chain concepts and more practice with NSDictionary.
In Chapter 14, you will learn how to use debug gauges, Instruments, and the static analyzer to optimize
the performance of TouchTracker.