For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
v
Contents at a Glance
About the Authors .............................................................................................................. xxi
About the Technical Reviewers ....................................................................................... xxiii
Chapter 1: Welcome to the Jungle N .....................................................................................1
Chapter 2: Appeasing the Tiki Gods N .................................................................................11
Chapter 3: Handling Basic Interaction N .............................................................................43
Chapter 4: More User Interface Fun N ................................................................................69
Chapter 5: Autorotation and Autosizing N ........................................................................115
Chapter 6: Multiview Applications N ................................................................................139
Chapter 7: Tab Bars and Pickers N ...................................................................................169
Chapter 8: Introduction to Table Views N .........................................................................221
Chapter 9: Navigation Controllers and Table Views N .......................................................269
Chapter 10: Storyboards N ................................................................................................341
Chapter 11: iPad Considerations N ...................................................................................367
Chapter 12: Application Settings and User Defaults N ......................................................397
Chapter 13: Basic Data Persistence N ..............................................................................435
Chapter 14: Hey! You! Get onto iCloud! N .........................................................................481
vi Contents at a Glance
Chapter 15: Grand Central Dispatch, Background Processing, and You N ........................511
Chapter 16: Drawing with Quartz and OpenGL N ..............................................................545
Chapter 17: Taps, Touches, and Gestures N ......................................................................585
Chapter 18: Where Am I? Finding Your Way with Core Location and Map Kit N ...............619
Chapter 19: Whee! Gyro and Accelerometer! N ................................................................637
Chapter 20: The Camera and Photo Library N ...................................................................667
Chapter 21: Collection View N ..........................................................................................677
Chapter 22: Application Localization N .............................................................................691
Appendix A: Where to Next? N ..........................................................................................717
Index .................................................................................................................................725
1
Chapter 1
Welcome to the Jungle
So, you want to write iPhone, iPod touch, and iPad applications? Well, we can’t say that we blame
you. iOS, the core software of all of these devices, is an exciting platform that has been seeing
explosive growth since it first came out in 2007. The rise of the mobile software platform means that
people are using software everywhere they go. With the release of iOS 6, and the latest incarnation
of the iOS software development kit (SDK), things have only gotten better and more interesting.
What This Book Is
This book is a guide to help you get started down the path to creating your own iOS applications.
Our goal is to get you past the initial difficulties, to help you understand the way iOS applications
work and how they are built.
As you work your way through this book, you will create a number of small applications, each
designed to highlight specific iOS features and to show you how to control or interact with those
features. If you combine the foundation you’ll gain through this book with your own creativity and
determination, and then add in the extensive and well-written documentation provided by Apple,
you’ll have everything you need to build your own professional iPhone and iPad applications.
Tip Dave, Jack, Jeff, and Fredrik have set up a forum for this book. It’s a great place to meet like-minded
folks, get your questions answered, and even answer other people’s questions. The forum is at
http://forum.learncocoa.org. Be sure to check it out!
What You Need
Before you can begin writing software for iOS, you’ll need a few items. For starters, you’ll need
an Intel-based Macintosh, running Lion (OS X 10.7) or later. Any recent Intel-based Macintosh
computer—laptop or desktop—should work just fine.
- 1
- 2
前往页