Synopses & Reviews
Let's say you have a killer app idea for iPhone and iPad. Where do you begin? Head First iPhone and iPad Development will help you get your first application up and running in no time. You'll not only learn how to design for Apple's devices, you'll also master the iPhone SDK tools -- including Interface Builder, Xcode, and Objective-C programming principles -- to make your app stand out.
Whether you're a seasoned Mac developer who wants to jump into the App store, or someone with strong object-oriented programming skills but no Mac experience, this book is a complete learning experience for creating eye-catching, top-selling iPhone and iPad applications.
- Install the iPhone OS SDK and get started using Interface Builder and XCode
- Put Objective-C core concepts to work, including message passing, protocols, properties, and memory management
- Take advantage of iPhone OS patterns such as datasources and delegates
- Preview your applications in the Simulator
- Build more complicated interactions that utilize multiple views, data entry/editing, and rotation
- Work with the iPhone's camera, GPS, and accelerometer
- Optimize, test, and distribute your application
We think your time is too valuable to waste struggling with new concepts. Using the latest research in cognitive science and learning theory to craft a multi-sensory learning experience, Head First iPhone and iPad Development has a visually rich format designed for the way your brain works, not a text-heavy approach that puts you to sleep.
Pilone delivers a learner's guide to creating Objective-C applications for the iPhone and iPad.
Using Head First's unique visually rich format, this book teaches experienced programmers best practices for building iPhone apps that will sell. Using the proven formula that has turned several Head First titles into bestsellers, this book will help readers get their first iPhone apps up and running in no time. They'll quickly master core Objective-C programming principles and learn skills with tools in the iPhone SDK, including Interface Builder and Xcode. Head First iPhone Development is a complete learning experience for creating eye-catching, top-selling iPhone applications.
About the Author
Dan Pilone is Rational Certified in OOAD, RUP, and Rose. His previous employer was a Rational Partner and Dan has taught (formally as well as informally) quite a few UML classes for Hughes, ARINC, UPS, Georgia Systems Operation Center (GSOC), and the Naval Research Laboratory (NRL). As a software architect for clients, Dan has made extensive use of UML (in all views of the architecture) to help convey information to management, developers, team leads, and requirement folks (doing use case analysis in a UML-like fashion). Dan is also Sun J2EE Enterprise Architect certified, which required him to submit his own EJB designs using UML sequence, class, and collaboration diagrams. Dan has worked at Hughes Inc. developing a satellite communication system for which they did real-time UML modeling, and also large numbers of State Diagrams to model the acquisition/control stages.
Tracey Pilone, a licensed Civil Engineer, is a freelance technical writer who has worked on mission planning and RF analysis software for the Navy. She has a Civil Engineering degree from Virgina Tech and a Masters of Education from the University of Virginia.
Table of Contents
; Advance Praise for Head First iPhone and iPad Development; Praise for other Head First books; ; How to use this Book: Intro; Who is this book for?; Who should probably back away from this book?; Metacognition: thinking about thinking; Here's what YOU can do to bend your brain into submission; Read me; The technical review team; Acknowledgments; Safari® Books Online; Chapter 1: Getting Started: Going Mobile with iOS; 1.1 So, you want to build an iOS app...; 1.2 ...'cause everyone wants one!; 1.3 Apps live in an iTunes universe; 1.4 Time to make a decision; 1.5 It all starts with the iOS SDK; 1.6 Take a look around; 1.7 Xcode includes app templates to help you get started; 1.8 Xcode is a full-featured IDE; 1.9 Xcode is the hub of your iOS project; 1.10 Build your interface within Xcode; 1.11 Add the button to your view; 1.12 The iOS simulator lets you test your app on your Mac; 1.13 iDecide's logic; 1.14 Changing the button text; 1.15 You're using the Model View Controller pattern; 1.16 iDecide is actually a little simpler; 1.17 What happened?; 1.18 Use the GUI editor to connect UI controls to code; 1.19 A component can trigger certain events; 1.20 Connect your events to methods; 1.21 You've built your first iPhone app!; 1.22 Your iOS Toolbox; Chapter 2: iOS App Patterns: Hello, Renee!; 2.1 First, we need to figure out what Mike (really) wants; 2.2 App design rules--the iOS HIG; 2.3 HIG guidelines for pickers and buttons; 2.4 Create a new View-based project for InstaEmail; 2.5 The life of a root view; 2.6 We need data; 2.7 Use pickers when you want controlled input; 2.8 Pickers get their data from a datasource...; 2.9 That pattern is back; 2.10 First, declare that the controller conforms to both protocols; 2.11 The datasource protocol has two required methods; 2.12 Connect the datasource just like actions and outlets; 2.13 There's just one method for the delegate protocol; 2.14 Actions, outlets, and events; 2.15 Connect the event to the action; 2.16 Add the IBOutlet and property to your view controller; 2.17 Next, synthesize the property...; 2.18 Connect the picker to our outlet; 2.19 Use your picker reference to pull the selected values; 2.20 Your iOS Toolbox; Chapter 3: Objective-C for iOS: Email needs variety; 3.1 Renee is catching on....; 3.2 Make room for custom input; 3.3 Header files describe the interface to your class; 3.4 Auto-generated accessors also handle memory management; 3.5 To keep your memory straight, you need to remember just two things; 3.6 But when Mike's finished typing...; 3.7 Customize your UITextField; 3.8 Components that use the keyboard ask it to appear...; 3.9 Ask the UITextField to give up focus; 3.10 Messages in Objective-C use named arguments; 3.11 Use message passing to tell our View Controller when the Done button is pressed; 3.12 Where's the custom note?; 3.13 Your Objective-C Toolbox; Chapter 4: Multiple Views: A table with a view; 4.1 So, how do these views fit together?; 4.2 The navigation template pulls multiple views together; 4.3 The table view is built in; 4.4 A table is a collection of cells; 4.5 Just a few more drinks...; 4.6 Plists are an easy way to save and load data; 4.7 Arrays (and more) have built-in support for plists; 4.8 Use a detail view to drill down into data; 4.9 A closer look at the detail view; 4.10 Use the Navigation Controller to switch between views; 4.11 Navigation Controllers maintain a stack of View Controllers; 4.12 Dictionaries store information as key-value pairs; 4.13 Debugging--the dark side of iOS development; 4.14 First stop on your debugging adventure: the console; 4.15 Interact with your application while it's running; 4.16 Xcode supports you after your app breaks, too; 4.17 The Xcode debugger shows you the state of your application; 4.18 Your iOS Toolbox; Chapter 5: Plists and Modal Views: Refining your app; 5.1 It all started with Sam...; 5.2 Use the debugger to investigate the crash; 5.3 Update your code to handle a plist of dictionaries; 5.4 The Detail View needs data; 5.5 The other keys are key; 5.6 We have a usability problem; 5.7 Use a disclosure button to show that there are more details available; 5.8 Sales were going strong; 5.9 Use Navigation Controller buttons to add drinks; 5.10 The button should create a new view; 5.11 We need a view...but not necessarily a new view; 5.12 The View Controller defines the behavior for the view; 5.13 A nib file contains the UI components and connections...; 5.14 You can subclass and extend view controllers like any other class; 5.15 Modal views focus the user on the task at hand...; 5.16 Any view can present a modal view; 5.17 Our modal view doesn't have a navigation bar; 5.18 Create the Save and Cancel buttons; 5.19 Write the Save and Cancel actions; 5.20 Your iOS Toolbox; Chapter 6: Saving, Editing, and Sorting Data: Everyone's an editor...; 6.1 Sam is ready to add a Red-Headed School Girl...; 6.2 ...but the keyboard is in the way; 6.3 Wrap your content in a scroll view; 6.4 The scroll view is the same size as the screen; 6.5 The keyboard changes the visible area; 6.6 iOS notifies you about the keyboard; 6.7 Register with the default notification center for events; 6.8 Keyboard events tell you the keyboard state and size; 6.9 The table view doesn't know its data has changed; 6.10 The array is out of order, too; 6.11 Table views have built-in support for editing and deleting; 6.12 Your iOS Development Toolbox; Chapter 7: Migrating to iPad: We need more room; 7.1 DrinkMixer on the iPad; 7.2 The iPad simulator; 7.3 The HIG covers iPads, too; 7.4 Use Xcode to build your Universal app; 7.5 Check your devices; 7.6 Rotation is key with iPad; 7.7 A persistent view problem; 7.8 Don't forget the tableview; 7.9 Your iOS Development Toolbox; Chapter 8: Tab Bars and Core Data: Enterprise apps; 8.1 HF bounty hunting; 8.2 A new iPhone control; 8.3 Choose a template to start iBountyHunter; 8.4 There's a different structure for universal apps; 8.5 Drawing how iBountyHunter iPhone works...; 8.6 ...and how it fits with the universal app; 8.7 Build the fugitive list view; 8.8 Next up: the Captured view; 8.9 A view's contents are actually subviews; 8.10 After a quick meeting with Bob...; 8.11 Core Data lets you focus on your app; 8.12 Core Data needs to know what to load; 8.13 Core Data describes entities with a Managed Object Model; 8.14 Build your Fugitive entity; 8.15 Use an NSFetchRequest to describe your search; 8.16 Bob's database is a resource; 8.17 Back to the Core Data stack; 8.18 The template sets things up for a SQLite DB; 8.19 iOS Apps are read-only; 8.20 The iPhone's application structure defines where you can read and write; 8.21 Copy the database to the Documents directory; 8.22 Your Core Data Toolbox; Chapter 9: Migrating and Optimizing with Core Data: Things are changing; 9.1 Bob needs documentation; 9.2 Everything stems from our object model; 9.3 The data hasn't been updated; 9.4 Data migration is a common problem; 9.5 Migrate the old data into the new model; 9.6 Xcode makes it easy to version your data model; 9.7 Core Data can "lightly" migrate data; 9.8 Here's what you've done so far...; 9.9 Bob has some design input; 9.10 Your app has a lifecycle all its own...; 9.11 Multitasking rules of engagement; 9.12 A quick demo with Bob; 9.13 Use predicates for filtering data; 9.14 We need to set a predicate on our NSFetchRequest; 9.15 Core Data controller classes provide efficient results handling; 9.16 Time for some high-efficiency streamlining; 9.17 Create the new FetchedResultsController getter method; 9.18 We need to refresh the data; 9.19 Your Data Toolbox; Chapter 10: Camera, Map Kit, and Core Location: Proof in the real world; 10.1 For Bob, payment requires proof; 10.2 The way to the camera...; 10.3 There's a method for checking; 10.4 Prompt the user with action sheets; 10.5 Bob needs the where, in addition to the when; 10.6 Core Location can find you in a few ways; 10.7 Add a new framework; 10.8 Just latitude and longitude won't work for Bob; 10.9 Map Kit comes with iOS; 10.10 A little custom setup for the map; 10.11 Annotations require a little more work finesse; 10.12 Fully implement the annotation protocol; 10.13 Your Location Toolbox; Chapter 11: iPad UI: Natural interfaces; 11.1 Bob needs that iPad app, too...; 11.2 iOS HIG user experience guidelines; 11.3 Iterate your interface, too; 11.4 BountyHunterHD is based on a Split View Controller; 11.5 Unifying the custom stuff; 11.6 It seems we have a problem...; 11.7 UIWebview has lots of options; 11.8 HTML, CSS, and Objective-C; 11.9 Using UIWebView; 11.10 Your NUI Toolbox; Leftovers: The top 4 things (we didn't cover); #1. Internationalization and Localization; Localizing string resources; #2. View animations; #3. Accelerometer; Understanding device acceleration; #4. A word or two about gaming...; Quartz and OpenGL; Preparing an App for Distribution: Get ready for the App Store; Apple has rules; The Provisioning Profile pulls it all together; Keep track in the Organizer;