Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Buy Now $35.99
Standard view
Full view
of .
Look up keyword or section
Like this
17Activity

Table Of Contents

Intro
There’s a lot of buzz and a lot of money tied up in the App Store
Mobile applications aren’t just ported desktop apps
Anatomy of an iPhone app
Mike can’t make a decision
Make a good first impression
It all starts with the iPhone SDK
Xcode includes app templates to help you get started
Xcode is the hub of your iPhone project
...and plays a role in every part of writing your app
Build your interface using... Interface Builder
Add the button to your view
The iPhone Simulator lets you test your app on your Mac
What happened?
Use Interface Builder to connect UI controls to code
Interface Builder lists which events a component can trigger
Elements dispatch events when things happen to them
Connect your events to methods
Your iPhone Toolbox
First we need to figure out what Mike (really) wants
App design rules—the iPhone HIG
HIG guidelines for pickers and buttons
Create a new View-based project for InstaTwit
The life of a root view
First, get the data from Mike
Use pickers when you want controlled input
Fill the picker rows with Mike’s data
Pickers get their data from a datasource
There’s a pattern for that
First, declare that the controller conforms to both protocols
The datasource protocol has two required methods
Connect the datasource just like actions and outlets
There’s just one method for the delegate protocol
The button needs to be connected to an event
Header files describe the interface to your class
Auto-generated accessors also handle memory management
To keep your memory straight, you need to remember just two things
But when Mike’s finished typing
Customize your UITextField
Components that use the keyboard ask it to appear
Ask the textField to give up focus
Messages in Objective-C use named arguments
Use message passing to tell our view controller when the Done button is pressed
Something’s still not right
Your Objective-C Toolbox
So, how do these views fit together?
The navigation template pulls multiple views together
The navigation template starts with a table view
A table is a collection of cells
Just a few more drinks
Plists are an easy way to save and load data
Arrays (and more) have built-in support for plists
Use a detail view to drill down into data
A closer look at the detail view
Use the navigation controller to switch between views
Navigation controllers maintain a stack of views
Dictionaries store information as key-value pairs
Debugging—the dark side of iPhone development
First stop on your debugging adventure: the console
Interact with your application while it’s running
Xcode supports you after your app breaks, too
The Xcode debugger shows you the state of your application
What the heck is going on?
It all started with Sam
Use the debugger to investigate the crash
Update your code to handle a plist of dictionaries
The detail view needs data
Each dictionary has all the information we need
We have a usability problem
Use a disclosure indicator if your cell leads to more information
Sales were going strong
Use navigation controller buttons for editing
The button should create a new view
We need a view... but not necessarily a new view
The view controller defines the behavior for the view
A nib file contains the UI components and connections
You can subclass and extend views like any other class
Modal views focus the user on the task at hand
Any view can present a modal view
Our view doesn’t have a navigation bar
Create the save and cancel buttons
Write the save and cancel actions
Sam is ready to add a Red-Headed School Girl
We need to wrap our content in a scroll view
The scroll view is the same size as the screen
The keyboard changes the visible area
Register with the default notification center for events
Keyboard events tell you the keyboard state and size
The table view doesn’t know its data has changed
You need to ask the table view to reload its data
The array is out of order, too
Table views have built-in support for editing and deleting
Your iPhone Development Toolbox
HF bounty hunting
Choose a template to start iBountyHunter
Drawing how iBountyHunter works
Build the fugitive list view
Next up: the captured view
After a quick meeting with Bob
Core Data lets you focus on your app
Core Data needs to know what to load
Core Data describes entities with a Managed Object Model
Build your Fugitive entity
The template sets things up for a SQLite DB
The iPhone’s application structure defines where you can read and write
Copy the database to the correct place
To be continued
Your Core Data Toolbox
Bob needs documentation
Everything stems from our object model
The data hasn’t been updated
Data migration is a common problem
We need to migrate the old data into the new model
Xcode makes it easy to version the data model
Core Data can “lightly” migrate data
Bob has some design input
A quick demo with Bob
Use predicates for filtering data
We need to set a predicate on our NSFetchRequest
Core Data controller classes provide efficient results handling
Time for some high-efficiency streamlining
Next we need to change the search to use the controller
Refactor viewWillAppear to use the controller
We need to refresh the data
Your Data Toolbox
For Bob, payment requires proof!
The way to the camera
There’s a method for checking
Prompt the user with action sheets
Bob needs the where, in addition to the when
Core Location can find you in a few ways
Add a new framework
It’s been great having you here!
P. 1
Head First iPhone Development: A Learner's Guide to Creating Objective-C Applications for the iPhone

Head First iPhone Development: A Learner's Guide to Creating Objective-C Applications for the iPhone

Ratings:

4.0

(2)
|Views: 1,508|Likes:

Let's say you have an idea for a killer iPhone app. Where do you begin? Head First iPhone Development will help you get your first application up and running in no time. You'll quickly learn to use iPhone SDK tools, including Interface Builder and Xcode, and master Objective-C programming principles that will make your app stand out. It's a complete learning experience for creating eye-catching, top-selling iPhone applications.

Put Objective-C core concepts to work, including message passing, protocols, properties, and memory management Take advantage of iPhone patterns such as datasources and delegates Preview your applications in the iPhone Simulator Build complicated interactions that utilize multiple views, data entry/editing, and iPhone rotation Work with 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 Development provides a visually-rich format designed for the way your brain works, not a text-heavy approach that puts you to sleep.

Let's say you have an idea for a killer iPhone app. Where do you begin? Head First iPhone Development will help you get your first application up and running in no time. You'll quickly learn to use iPhone SDK tools, including Interface Builder and Xcode, and master Objective-C programming principles that will make your app stand out. It's a complete learning experience for creating eye-catching, top-selling iPhone applications.

Put Objective-C core concepts to work, including message passing, protocols, properties, and memory management Take advantage of iPhone patterns such as datasources and delegates Preview your applications in the iPhone Simulator Build complicated interactions that utilize multiple views, data entry/editing, and iPhone rotation Work with 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 Development provides a visually-rich format designed for the way your brain works, not a text-heavy approach that puts you to sleep.

More info:

Publish date: Oct 20, 2009
Added to Scribd: Jul 21, 2010
Copyright:Traditional Copyright: All rights reservedISBN:9781449389123
List Price: $35.99 Buy Now

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
This book can be read on up to 6 mobile devices.
Buy the full version from:Amazon
See more
See less

02/10/2015

552

9781449389123

$35.99

USD

You're Reading a Free Preview
Pages 23 to 108 are not shown in this preview.
You're Reading a Free Preview
Pages 131 to 369 are not shown in this preview.
You're Reading a Free Preview
Pages 392 to 504 are not shown in this preview.
You're Reading a Free Preview
Pages 545 to 552 are not shown in this preview.

Activity (17)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
psply liked this
Sylvie Pel liked this
sensiva884523 liked this
ramonice liked this
jitendra_keswani liked this
ALi liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->