HAPPY BOOKSGIVING
Use code BOOKSGIVING during checkout to save 40%-55% on books and eBooks. Shop now.
Register your product to gain access to bonus material or receive a coupon.
Sams Teach Yourself iPhone® Application Development
Second Edition
John Ray
Figures and code appear as they do in Xcode
Covers iOS 4.0 and up, and iPhone 4
Additional files and updates available online
In just 24 sessions of one hour or less, learn how to build powerful applications for today’s hottest mobile device: the iPhone! Using this book’s straightforward, step-by-step approach, you’ll master every skill and technology you need, from setting up your iPhone development environment to building great user interfaces, sensing motion to writing multitasking applications. Each lesson builds on what you’ve already learned, giving you a rock-solid foundation for real-world success!
Step-by-step instructions carefully walk you through the most common iOS development tasks.
Quizzes and Exercises at the end of each chapter help you test your knowledge.
By the Way notes present interesting information related to the discussion.
Did You Know? tips offer advice or show you easier ways to perform tasks.
Watch Out! cautions alert you to possible problems and give you advice on how to avoid them.
Printed in full color—figures and code appear as they do in Xcode
http://teachyourselfiphone.com
Building Background-Aware Applications for iPhone
Download the sample pages (includes Chapter 21 and Index)
Introduction
HOUR 1: Preparing Your System and iPhone for Development
Welcome to the iOS Platform
Becoming an iOS Developer
Creating a Development Provisioning Profile
Developer Technology Overview
Summary
Q&A
Workshop
HOUR 2: Introduction to Xcode and the iPhone Simulator
Using Xcode
Using the iPhone Simulator
Further Exploration
Summary
Q&A
Workshop
HOUR 3: Discovering Objective-C: The Language of Apple Platforms
Object-Oriented Programming and Objective-C
Exploring the Objective-C File Structure
Objective-C Programming Basics
Memory Management
Further Exploration
Summary
Q&A
Workshop
HOUR 4: Inside Cocoa Touch
What Is Cocoa Touch?
Exploring the iOS Technology Layers
Tracing the iPhone Application Life Cycle
Cocoa Fundamentals
Exploring the iOS Frameworks with Xcode
Summary
Q&A
Workshop
HOUR 5: Exploring Interface Builder
Understanding Interface Builder
Creating User Interfaces
Customizing Interface Appearance
Connecting to Code
Further Exploration
Summary
Q&A
Workshop
HOUR 6: Model-View-Controller Application Design
Understanding the Model-View-Controller Paradigm
How Xcode and Interface Builder Implement MVC
Using the View-Based Application Template
Further Exploration
Summary
Q&A
Workshop
HOUR 7: Working with Text, Keyboards, and Buttons
Basic User Input and Output
Using Text Fields, Text Views, and Buttons
Setting Up the Project
Further Exploration
Summary
Q&A
Workshop
HOUR 8: Handling Images, Animation, and Sliders
User Input and Output
Creating and Managing Image Animations and Sliders
Further Exploration
Summary
Q&A
Workshop
HOUR 9: Using Advanced Interface Objects and Views
User Input and Output (Continued)
Using Switches, Segmented Controls, and Web Views
Using Scrolling Views
Further Exploration
Summary
Q&A
Workshop
HOUR 10: Getting the User’s Attention
Exploring User Alert Methods
Generating Alerts
Using Action Sheets
Using Alert Sounds and Vibrations
Further Exploration
Summary
Q&A
Workshop
HOUR 11: Making Multivalue Choices with Pickers
Understanding Pickers
Using Date Pickers
Implementing a Custom Picker View
Further Exploration
Summary
Q&A
Workshop
HOUR 12: Implementing Multiple Views with Toolbars and Tab Bars
Exploring Single Versus Multi-View Applications
Creating a Multi-View Toolbar Application
Building a Multi-View Tab Bar Application
Further Exploration
Summary
Q&A
Workshop
HOUR 13: Displaying and Navigating Data Using Table Views
Understanding Table Views and Navigation Controllers
Building a Simple Table View Application
Creating a Navigation-Based Application
Further Exploration
Summary
Q&A
Workshop
HOUR 14: Reading and Writing Application Data
Design Considerations
Reading and Writing User Defaults
Understanding the iPhone File System Sandbox
Implementing File System Storage
Further Exploration
Summary
Q&A
Workshop
HOUR 15: Building Rotatable and Resizable User Interfaces
Rotatable and Resizable Interfaces
Creating Rotatable and Resizable Interfaces with Interface Builder
Reframing Controls on Rotation
Swapping Views on Rotation
Further Exploration
Summary
Q&A
Workshop
HOUR 16: Using Advanced Touches and Gestures
Multitouch Gesture Recognition
Using Gesture Recognizers
Further Exploration
Summary
Q&A
Workshop
HOUR 17: Sensing Orientation and Motion
Understanding iPhone Motion Hardware
Accessing Orientation and Motion Data
Sensing Orientation
Detecting Tilt and Rotation
Further Exploration
Summary
Workshop
HOUR 18: Working with Rich Media
Exploring Rich Media
Preparing the Media Playground Application
Using the Movie Player
Creating and Playing Audio Recordings
Using the Photo Library and Camera
Accessing and Playing the iPod Library
Further Exploration
Summary
Q&A
Workshop
HOUR 19: Interacting with Other Applications
Extending Application Integration
Using Address Book, Email, and Maps… Oh My!
Further Exploration
Summary
Q&A
Workshop
HOUR 20: Implementing Location Services
Understanding Core Location
Creating a Location-Aware Application
Understanding the Magnetic Compass
Further Exploration
Summary
Q&A
Workshop
HOUR 21: Building Background-Aware Applications
Understanding iOS 4 Backgrounding
Disabling Backgrounding
Handling Background Suspension
Implementing Local Notifications
Using Task-Specific Background Processing
Completing a Long-Running Background Task
Further Exploration
Summary
Q&A
Workshop
HOUR 22: Building Universal Applications
Universal Application Development
Understanding the Universal Window-Based Application Template
Other Universal Application Tools
Further Exploration
Summary
Q&A
Workshop
HOUR 23: Application Debugging and Optimization
Debugging in Xcode
Monitoring with Instruments
Profiling with Shark
Further Exploration
Summary
Q&A
Workshop
HOUR 24: Distributing Applications Through the App Store
Preparing an Application for the App Store
Submitting an Application for Approval
Promoting Your Application
Exploring Other Distribution Methods
Summary
Q&A
Workshop
9780672332203 TOC 9/24/2010