Beginning iPhone Development: Exploring the iPhone SDK

Jeff LaMarche, David Mark



Please note that there is now an iPhone 3 edition of this title available!

Are you a programmer looking for a new challenge? Does the thought of building your very own iPhone app make your heart race and your pulse quicken? If so, then Beginning iPhone Development is just the book for you.

Assuming only a minimal working knowledge of Objective-C, and written in a friendly, easy-to-follow style, Beginning iPhone Development offers a complete soup-to-nuts course in iPhone and iPod Touch programming.

The book starts with the basics, walking you through the process of downloading and installing Apple's free iPhone SDK, then stepping you though the creation of your first simple iPhone application. You'll move on from there, mastering all the iPhone interface elements that you've come to know and love, such as buttons, switches, pickers, toolbars, sliders, etc.

You'll master a variety of design patterns, from the simplest single view to complex hierarchical drill-downs. You'll master the art of table-building and learn how to save your data using the iPhone file system. You'll also learn how to save and retrieve your data using SQLite, iPhone's built-in database management system.

You'll learn how to draw using Quartz 2D and OpenGL ES. You'll add MultiTouch Gestural Support (pinches and swipes) to your applications, and work with the Camera, Photo Library, and Accelerometer. You'll master application preferences, learn how to localize your apps into other languages, and so much more.

Apple's iPhone SDK, this book, and your imagination are all you'll need to start building your very own best-selling iPhone applications.

You can discover more about this book, download source code, and find support forums at the book's companion site:


"People ask me again and again about how to get started in iPhone development, but I never had a very good answer for them until now. Dave and Jeff's book starts at the beginning in clear English, making sure you understand the fundamentals with many large illustrations. From there, they progress into key concepts such as the MVC pattern and ImageBuilder fundamentals. Additionally, I find myself flipping back to it as a reference guide—the plethora of code samples make it a must-have."

—Steve Demeter, Creator of "Trism" and owner of Demiforce LLC

"Beginning iPhone Development delivers a clear picture of the entire development process from registering as an iPhone developer through creation of complete applications. There is a wealth of examples illustrating each feature of the iPhone. The authors did an excellent job of demonstrating "best practice" coding methodology throughout the book. You would be hard pressed to find a better guide to creating software for the iPhone."

—Aaron Basil,

"Dave Mark has always been the king of Mac programming authors, and now he's proven to be the reigning king for books on iPhone development!

"Beginning iPhone Development is the definitive guide for iPhone development, and anyone aspiring to develop for the iPhone should get this invaluable reference."

—Brian Greenstone, President & CEO, Pangea Software, Inc.

"Jeff and Dave have done an exceptional job exploring the iPhone SDK. This book is far and away the single best resource for iPhone SDK development. Developers will latch on to this book and find it useful as they create the next great iPhone application. If you're a developer with an interest in this amazing new platform, this is a must buy."

—Chris Stewart, Founder,

"If you're planning on coding for the iPhone, start here. Dave and Jeff know their stuff and also know how to explain it. I was amazed how much stuff they cover, from Hello World through analyzing user gestures. Not only do they cover the fun stuff like playing with the camera, they cover real-world development issues like localization. I learned a huge amount from them"

—Mark Dalrymple, Co-founder, CocoaHeads, and Principal Author, Advanced Mac OS X Programming

"Starting with an overview of the technology, how to approach the device, the authors lead us straight into the heart of iPhone development. As you progress, you'll learn more about various layout engines and view managers, as well as the more meaty topics like accelerometer and GPS APIs. This book is a must-have for anyone interested in getting started quickly and efficiently with iPhone development!"

—Chris Pelsor, Manager, Tarantell:Hybrid

"All in all I was very surprised and pleased with the book. I've had the fortune of reading many technical books, and few do a great job of walking someone through the basics without making them feel like a dolt. It felt like every time I was stuck or unsure there was a tip, hint or paragraph which explained what was going on."

—Cory Foy, at

Summary of Contents

  1. Welcome to the Jungle
  2. Appeasing the Tiki Gods
  3. Handling Basic Interaction
  4. More User Interface Fun
  5. Autorotation and Autosizing
  6. Multiview Applications
  7. Tab Bars and Pickers
  8. Introduction to Table Views
  9. Navigation Controllers and Table Views
  10. Application Settings and User Defaults
  11. Basic Data Persistence
  12. Drawing with Quartz and OpenGL
  13. Taps, Touches, and Gestures
  14. Where Am I? Finding Your Way with Core Location
  15. Whee!
  16. iPhone Camera and Photo Library
  17. Application Localization
  18. Where to Next?

About the Apress Beginning Series

The Beginning series from Apress is the right choice to get the information you need to land that crucial entry–level job. These books will teach you a standard and important technology from the ground up because they are explicitly designed to take you from “novice to professional.” You’ll start your journey by seeing what you need to know—but without needless theory and filler. You’ll build your skill set by learning how to put together real–world projects step by step. So whether your goal is your next career challenge or a new learning opportunity, the Beginning series from Apress will take you there—it is your trusted guide through unfamiliar territory!


請注意,現在有一個名為iPhone 3 edition的版本可供使用!
你是一位尋找新挑戰的程式設計師嗎?想到自己建立一個iPhone應用程式是否讓你心跳加速?如果是的話,那麼《Beginning iPhone Development》就是適合你的書籍。
本書假設你只具備最基本的Objective-C知識,並以友善且易於理解的方式撰寫,提供了一個完整的iPhone和iPod Touch程式設計課程。
本書從基礎開始,引導你下載並安裝蘋果免費的iPhone SDK,然後逐步指導你建立第一個簡單的iPhone應用程式。接著,你將掌握所有你熟悉和喜愛的iPhone介面元素,例如按鈕、開關、選擇器、工具欄、滑桿等等。
你將學習如何使用Quartz 2D和OpenGL ES進行繪圖。你將為應用程式添加多點觸控支持(捏合和滑動),並使用相機、照片庫和加速度計進行開發。你將掌握應用程式偏好設置,學習如何將應用程式本地化為其他語言,以及更多其他技巧。
只需要蘋果的iPhone SDK、本書和你的想像力,你就可以開始建立屬於自己的暢銷iPhone應用程式。
- Steve Demeter,《Trism》創作者,Demiforce LLC所有者

“《Beginning iPhone Development》清晰地呈現了從註冊為iPhone開發者到創建完整應用程式的整個開發過程。書中有大量示例展示了iPhone的每個功能。作者在整本書中展示了“最佳實踐”的編碼方法。你很難找到一本更好的iPhone軟體開發指南。”
- Aaron Basil,

“Dave Mark一直是Mac程式設計作者之王,現在他已經成為iPhone開發書籍的王者!”
“《Beginning iPhone Development》是iPhone開發的權威指南,任何有意開發iPhone的人都應該購買這本寶貴的參考書。”
- Brian Greenstone,Pangea Software, Inc.總裁兼首席執行官

“Jeff和Dave在探索iPhone SDK方面做得非常出色。這本書是iPhone SDK開發的最佳資源。開發者將會喜歡這本書,並在創建下一個偉大的iPhone應用程式時發現它的用處。如果你是一位對這個令人驚奇的新平台感興趣的開發者,這是一本必買的書。”
- Chris Stewart,iPhoneDevSDK.com創始人