You are previewing Sams Teach Yourself iOS 6 Application Development in 24 Hours, Fourth Edition.
O'Reilly logo
Sams Teach Yourself iOS 6 Application Development in 24 Hours, Fourth Edition

Book Description

Covers iOS 6, Xcode 4.5+, iPhone, iPad, and More!
Figures and code appear as they do in Xcode 4.5+

In just 24 sessions of one hour each, learn how to build powerful applications for today’s hottest handheld devices: the iPhone and iPad! Using this book’s straightforward, step-by-step approach, you’ll master every skill and technology you need, from setting up your iOS development environment to building great responsive user interfaces, from 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.
Activities at the end of each chapter help you test your knowledge.
Notes present interesting information related to the discussion.
Tips offer advice or show you easier ways to perform tasks.
Cautions alert you to possible problems and give you advice on how to avoid them.

• Printed in full color
• Covers iOS 6.0 and up
• Use the new Objective-C NSArray, NSDictionary, and NSNumber Data Type shortcuts introduced in Xcode 4.5.2
• Learn to navigate the Xcode 4.5+ development environment
• Prepare your system and iDevice for efficient development
• Get started quickly with Apple’s Objective-C and Cocoa Touch
• Understand the Model-View-Controller (MVC) development paradigm
• Visually design and code interfaces using Xcode storyboards, segues, exits, and the iOS Object Library
• Use Auto Layout to adapt to different screen sizes and orientations
• Build advanced UIs with tables, split views, navigation controllers, and more
• Read and write preferences and data, and create System Settings plug-ins
• Use the iOS media playback and recording capabilities
• Take photos and manipulate graphics with Core Image
• Sense motion, orientation, and location with the accelerometer, gyroscope, and GPS
• Integrate online services using Twitter, Facebook, Email, Web Views, and Apple Maps
• Create universal applications that run on both the iPhone and iPad
• Write background-aware multitasking applications
• Trace and debug your applications as they run

Table of Contents

  1. Title Page
  2. Copyright Page
  3. Contents at a Glance
  4. Table of Contents
  5. About the Author
  6. Dedication
  7. Acknowledgments
  8. We Want to Hear from You!
  9. Reader Services
  10. Introduction
    1. Who Can Become an iOS Developer?
    2. Who Should Use This Book?
    3. What Is (and Isn’t) in This Book?
  11. Hour 1. Preparing Your System and iDevice for Development
    1. Welcome to the iOS Platform
    2. Becoming an iOS Developer
    3. Creating and Installing a Development Provisioning Profile
    4. Running Your First iOS App
    5. Developer Technology Overview
    6. Further Exploration
    7. Summary
    8. Q&A
    9. Workshop
    10. Activities
  12. Hour 2. Introduction to Xcode and the iOS Simulator
    1. Using Xcode
    2. Using the iOS Simulator
    3. Further Exploration
    4. Summary
    5. Q&A
    6. Workshop
    7. Activities
  13. Hour 3. Discovering Objective-C: The Language of Apple Platforms
    1. Object-Oriented Programming and Objective-C
    2. Exploring the Objective-C File Structure
    3. Objective-C Programming Basics
    4. Memory Management and Automatic Reference Counting
    5. Further Exploration
    6. Summary
    7. Q&A
    8. Activities
  14. Hour 4. Inside Cocoa Touch
    1. What Is Cocoa Touch?
    2. Exploring the iOS Technology Layers
    3. Tracing the iOS Application Life Cycle
    4. Cocoa Fundamentals
    5. Exploring the iOS Frameworks with Xcode
    6. Further Exploration
    7. Summary
    8. Q&A
    9. Workshop
    10. Activities
  15. Hour 5. Exploring Interface Builder
    1. Understanding Interface Builder
    2. Creating User Interfaces
    3. Customizing the Interface Appearance
    4. Connecting to Code
    5. Further Exploration
    6. Summary
    7. Q&A
    8. Workshop
    9. Activities
  16. Hour 6. Model-View-Controller Application Design
    1. Understanding the Model-View-Controller Design Pattern
    2. How Xcode Implements MVC
    3. Using the Single View Application Template
    4. Further Exploration
    5. Summary
    6. Q&A
    7. Workshop
    8. Activities
  17. Hour 7. Working with Text, Keyboards, and Buttons
    1. Basic User Input and Output
    2. Using Text Fields, Text Views, and Buttons
    3. Further Exploration
    4. Summary
    5. Q&A
    6. Workshop
    7. Activities
  18. Hour 8. Handling Images, Animation, Sliders, and Steppers
    1. User Input and Output
    2. Creating and Managing Image Animations, Sliders, and Steppers
    3. Further Exploration
    4. Summary
    5. Q&A
    6. Workshop
    7. Activities
  19. Hour 9. Using Advanced Interface Objects and Views
    1. User Input and Output (Continued)
    2. Using Switches, Segmented Controls, and Web Views
    3. Using Scrolling Views
    4. Further Exploration
    5. Summary
    6. Q&A
    7. Workshop
    8. Activities
  20. Hour 10. Getting the User’s Attention
    1. Alerting the User
    2. Exploring User Alert Methods
    3. Further Exploration
    4. Summary
    5. Q&A
    6. Workshop
  21. Hour 11. Implementing Multiple Scenes and Popovers
    1. Introducing Multiscene Storyboards
    2. Understanding the iPad Popover
    3. Using a Modal Segue
    4. Using a Popover
    5. Further Exploration
    6. Summary
    7. Q&A
    8. Workshop
    9. Activities
  22. Hour 12. Making Choices with Toolbars and Pickers
    1. Understanding the Role of Toolbars
    2. Exploring Pickers
    3. Using the Date Picker
    4. Using a Custom Picker
    5. Further Exploration
    6. Summary
    7. Q&A
    8. Workshop
    9. Activities
  23. Hour 13. Advanced Storyboards Using Navigation and Tab Bar Controllers
    1. Advanced View Controllers
    2. Exploring Navigation Controllers
    3. Understanding Tab Bar Controllers
    4. Using a Navigation Controller
    5. Using a Tab Bar Controller
    6. Further Exploration
    7. Summary
    8. Q&A
    9. Workshop
    10. Activities
  24. Hour 14. Navigating Information Using Table Views and Split View Controllers
    1. Understanding Tables
    2. Exploring the Split View Controller (iPad Only)
    3. A Simple Table View Application
    4. Creating a Master-Detail Application
    5. Further Exploration
    6. Summary
    7. Q&A
    8. Workshop
    9. Activities
  25. Hour 15. Reading and Writing Application Data
    1. iOS Applications and Data Storage
    2. Data Storage Approaches
    3. Creating Implicit Preferences
    4. Implementing System Settings
    5. Implementing File System Storage
    6. Further Exploration
    7. Summary
    8. Q&A
    9. Workshop
    10. Activities
  26. Hour 16. Building Responsive User Interfaces
    1. Responsive Interfaces
    2. Using Auto Layout
    3. Programmatically Defined Interfaces
    4. Swapping Views on Rotation
    5. Further Exploration
    6. Summary
    7. Q&A
    8. Workshop
    9. Activities
  27. Hour 17. Using Advanced Touches and Gestures
    1. Multitouch Gesture Recognition
    2. Adding Gesture Recognizers
    3. Using Gesture Recognizers
    4. Further Exploration
    5. Summary
    6. Q&A
    7. Workshop
    8. Activities
  28. Hour 18. Sensing Orientation and Motion
    1. Understanding Motion Hardware
    2. Accessing Orientation and Motion Data
    3. Sensing Orientation
    4. Detecting Tilt and Rotation
    5. Further Exploration
    6. Summary
    7. Q&A
    8. Workshop
    9. Activities
  29. Hour 19. Working with Rich Media
    1. Exploring Rich Media
    2. The Media Playground Application
    3. Further Exploration
    4. Summary
    5. Q&A
    6. Workshop
  30. Hour 20. Interacting with Other Applications
    1. Extending Application Integration
    2. Using the Address Book, Email, Social Networking, and Maps
    3. Further Exploration
    4. Summary
    5. Q&A
    6. Workshop
    7. Activities
  31. Hour 21. Implementing Location Services
    1. Understanding Core Location
    2. Creating a Location-Aware Application
    3. Using the Magnetic Compass
    4. Further Exploration
    5. Summary
    6. Q&A
    7. Workshop
    8. Activities
  32. Hour 22. Building Background-Aware Applications
    1. Understanding iOS Backgrounding
    2. Disabling Backgrounding
    3. Handling Background Suspension
    4. Implementing Local Notifications
    5. Using Task-Specific Background Processing
    6. Completing a Long-Running Background Task
    7. Further Exploration
    8. Summary
    9. Q&A
    10. Workshop
    11. Activities
  33. Hour 23. Building Universal Applications
    1. Universal Application Development
    2. Creating a Universal Application (Take 1)
    3. Creating a Universal Application (Take 2)
    4. Using Multiple Targets
    5. Further Exploration
    6. Summary
    7. Q&A
    8. Workshop
    9. Activities
  34. Hour 24. Application Tracing and Debugging
    1. Instant Feedback with NSLog
    2. Using the Xcode Debugger
    3. Further Exploration
    4. Summary
    5. Q&A
    6. Workshop
    7. Activities
  35. Index
  36. Ad Pages