Beginning iOS 5 Development Exploring the iOS SDK 1st Edition Dave Mark 2024 scribd download
Beginning iOS 5 Development Exploring the iOS SDK 1st Edition Dave Mark 2024 scribd download
com
https://ebookname.com/product/beginning-ios-5-development-
exploring-the-ios-sdk-1st-edition-dave-mark/
OR CLICK HERE
DOWLOAD NOW
https://ebookname.com/product/beginning-iphone-4-development-
exploring-the-ios-sdk-1st-edition-david-mark/
ebookname.com
https://ebookname.com/product/beginning-iphone-development-with-
swift-3-exploring-the-ios-sdk-3rd-ed-edition-maskrey/
ebookname.com
https://ebookname.com/product/beginning-iphone-3-development-
exploring-the-iphone-sdk-1st-edition-david-mark/
ebookname.com
https://ebookname.com/product/paradigms-of-combinatorial-
optimization-2nd-edition-problems-and-new-approaches-paschos/
ebookname.com
Municipal Solid Waste to Energy Conversion Processes
Economic Technical and Renewable Comparisons 1st Edition
Gary C Young
https://ebookname.com/product/municipal-solid-waste-to-energy-
conversion-processes-economic-technical-and-renewable-comparisons-1st-
edition-gary-c-young/
ebookname.com
https://ebookname.com/product/update-on-troubleshooting-the-pvc-
extrusion-process-1st-edition-subramanian/
ebookname.com
https://ebookname.com/product/frommer-s-california-2008-frommer-s-
complete-harry-basch/
ebookname.com
https://ebookname.com/product/roman-villas-in-central-italy-a-social-
and-economic-history-annalisa-marzano/
ebookname.com
https://ebookname.com/product/primary-care-geriatrics-a-case-based-
approach-5th-edition-richard-j-ham-md/
ebookname.com
Chinese Journalist 1st Edition Hugo De Burgh
https://ebookname.com/product/chinese-journalist-1st-edition-hugo-de-
burgh/
ebookname.com
Beginning iOS 5
Development
Exploring the iOS SDK
■■■
Dave Mark
Jack Nutting
Jeff LaMarche
i
Beginning iOS 5 Development: Exploring the iOS SDK
Copyright © 2011 by Dave Mark, Jack Nutting, Jeff LaMarche
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or
part of the material is concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way,
and transmission or information storage and retrieval, electronic adaptation, computer software,
or by similar or dissimilar methodology now known or hereafter developed. Exempted from this
legal reservation are brief excerpts in connection with reviews or scholarly analysis or material
supplied specifically for the purpose of being entered and executed on a computer system, for
exclusive use by the purchaser of the work. Duplication of this publication or parts thereof is
permitted only under the provisions of the Copyright Law of the Publisher's location, in its
current version, and permission for use must always be obtained from Springer. Permissions for
use may be obtained through RightsLink at the Copyright Clearance Center. Violations are liable
to prosecution under the respective Copyright Law.
ISBN-13 (pbk): 978-1-4302-3605-4
ISBN-13 (electronic): 978-1-4302-3606-1
Trademarked names, logos, and images may appear in this book. Rather than use a trademark
symbol with every occurrence of a trademarked name, logo, or image we use the names, logos,
and images only in an editorial fashion and to the benefit of the trademark owner, with no
intention of infringement of the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if
they are not identified as such, is not to be taken as an expression of opinion as to whether or not
they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of
publication, neither the authors nor the editors nor the publisher can accept any legal
responsibility for any errors or omissions that may be made. The publisher makes no warranty,
express or implied, with respect to the material contained herein.
President and Publisher: Paul Manning
Lead Editor: Tom Welsh
Technical Reviewer: Mark Dalrymple
Editorial Board: Steve Anglin, Mark Beckner, Ewan Buckingham, Gary Cornell, Morgan Ertel,
Jonathan Gennick, Jonathan Hassell, Robert Hutchinson, Michelle Lowman,
James Markham, Matthew Moodie, Jeff Olson, Jeffrey Pepper, Douglas Pundick, Ben
Renow-Clarke, Dominic Shakeshaft, Gwenan Spearing, Matt Wade, Tom Welsh
Coordinating Editor: Kelly Moritz
Copy Editor: Marilyn Smith
Compositor: MacPS, LLC
Indexer: BIM Indexing & Proofreading Services
Artist: SPi Global
Cover Designer: Anna Ishchenko
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233
Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail
orders-ny@springer-sbm.com, or visit www.springeronline.com.
For information on translations, please e-mail rights@apress.com, or visit www.apress.com.
Apress and friends of ED books may be purchased in bulk for academic, corporate, or
promotional use. eBook versions and licenses are also available for most titles. For more
information, reference our Special Bulk Sales–eBook Licensing web page at
www.apress.com/bulk-sales.
Any source code or other supplementary materials referenced by the author in this text is
available to readers at www.apress.com. For detailed information about how to locate your book’s
source code, go to www.apress.com/source-code/.
This book is dedicated to the memory of Steve Jobs.
We continue to be inspired by his spirit and his vision.
Contents at a Glance
Contents .............................................................................................................. v
About the Authors .............................................................................................xiv
About the Technical Reviewer ...........................................................................xv
Acknowledgments ............................................................................................xvi
Preface ............................................................................................................xvii
■Chapter 1: Welcome to the Jungle .................................................................. 1
■Chapter 2: Appeasing the Tiki Gods .............................................................. 13
■Chapter 3: Handling Basic Interaction........................................................... 45
■Chapter 4: More User Interface Fun .............................................................. 69
■Chapter 5: Autorotation and Autosizing ...................................................... 113
■Chapter 6: Multiview Applications .............................................................. 133
■Chapter 7: Tab Bars and Pickers ................................................................. 163
■Chapter 8: Introduction to Table Views ....................................................... 217
■Chapter 9: Navigation Controllers and Table Views .................................... 277
■Chapter 10: Storyboards ............................................................................. 353
■Chapter 11: iPad Considerations ................................................................. 381
■Chapter 12: Application Settings and User Defaults.................................... 407
■Chapter 13: Basic Data Persistence ............................................................ 445
■Chapter 14: Hey! You! Get onto iCloud! ....................................................... 493
■Chapter 15: Grand Central Dispatch, Background Processing, and You ..... 525
■Chapter 16: Drawing with Quartz and OpenGL ............................................ 563
■Chapter 17: Taps, Touches, and Gestures ................................................... 603
■Chapter 18: Where Am I? Finding Your Way with Core Location ................. 633
■Chapter 19: Whee! Gyro and Accelerometer! .............................................. 645
■Chapter 20: The Camera and Photo Library ................................................ 673
■Chapter 21: Application Localization........................................................... 685
■Chapter 22: Where to Next?......................................................................... 705
Index ............................................................................................................... 711
iv
Contents
vi
■ CONTENTS
vii
■ CONTENTS
viii
■ CONTENTS
x
■ CONTENTS
xi
■ CONTENTS
Blogs ...................................................................................................................................................................708
Conferences ........................................................................................................................................................708
Follow the Authors ..............................................................................................................................................710
Farewell ..............................................................................................................................................................710
Index ............................................................................................................... 711
xiii
About the Authors
Dave Mark is a longtime Mac developer and author, who has written a number
of books on Mac and iOS development, including Beginning iPhone 4
Development (Apress, 2011), More iPhone 3 Development (Apress, 2010), Learn
C on the Mac (Apress, 2008), Ultimate Mac Programming (Wiley, 1995), and
The Macintosh Programming Primer series (Addison-Wesley, 1992). Dave was
one of the founders of MartianCraft, an iOS and Android development house.
Dave loves the water and spends as much time as possible on it, in it, or near it.
He lives with his wife and three children in Virginia.
Jack Nutting has been using Cocoa since the olden days, long before it was
even called Cocoa. He has used Cocoa and its predecessors to develop software
for a wide range of industries and applications, including gaming, graphic
design, online digital distribution, telecommunications, finance, publishing,
and travel. When he is not working on Mac or iOS projects, he is developing
web applications with Ruby on Rails. Jack is a passionate proponent of
Objective-C and the Cocoa frameworks. At the drop of a hat, he will speak at
length on the virtues of dynamic dispatch and runtime class manipulations to
anyone who will listen (and even to some who won’t). Jack has written several
books on iOS and Mac development, including Beginning iPhone 4
Development (Apress, 2011), Learn Cocoa on the Mac (Apress, 2010), and Beginning iPad
Development for iPhone Developers (Apress, 2010). He blogs from time to time at
www.nuthole.com.
Jeff LaMarche is a Mac and iOS developer with more than 20 years of
programming experience. Jeff has written a number of iOS and Mac
development books, including Beginning iPhone 4 Development (Apress, 2011),
More iPhone 3 Development (Apress, 2010), and Learn Cocoa on the Mac
(Apress, 2010). Jeff is a principal at MartianCraft, an iOS and Android
development house. He has written about Cocoa and Objective-C for MacTech
Magazine, as well as articles for Apple’s developer web site. Jeff also writes
about iOS development for his widely read blog at
www.iphonedevelopment.blogspot.com.
xiv
Another Random Document on
Scribd Without Any Related Topics
"And be sent back to Dublin for me stepfather to kill
me! Oh, musha! Thank you, but I won't do that if the water
in these parts can drown me. Do you mind the way I was in
when you took me on first?"
"But," said Roger, "I'll go, all the same; if you'll take
Deasy back, I'll go. I've saved money enough to set me
going. I see a real good chance of getting on here; I'd
rather go, anyhow, than stand in his way."
"Go," said he, "I have no time to talk now;" and when
he came back Deasy was gone, to his great contentment.
At first, he felt very lonely, but he was soon far too busy
to think about it, though he missed Jack Sparling very
much, and regretted greatly that his friend could not write.
He began to carry out his cherished plan at once. In fact,
the first day that the train began to run regularly between
Kingsmore and Sandsea, Roger, with a huge basket filled
with fine fish, was one of the first third-class passengers.
He saw with satisfaction that none of the owners of the
original baskets and carts seemed to have thought of
leaving their old beats.
And now time passed rapidly with Roger for though his
work was not exactly hard, it required him to be always on
the alert, and to be at the place where the boats came in
very early. After a time, others set up baskets to convey
fish to Kingsmore, finding the prices there better than at
Sandsea. Then, indeed, Roger had a rather anxious time for
they tried to undersell him; but after a few days, he found
that most of his customers waited for him, saying that he
always gave them good fish, and never tried to cheat. He
went on making money steadily; in fact, his savings
presently amounted to so considerable a sum that his
common sense told him he ought not to carry it about with
him, even though he had sewed it up in a piece of stout
leather, and the leather in a piece of calico, and wore it tied
to a piece of cord round his neck.
"Well now, you dry your eyes and never fear, we'll get
the shilling. Why, it's the shut up house—and the train will
be gone. Never mind, I can go by the late one for once.
Come along, missy, till I find out who has the key of this
house. Your shilling is safe enough, for no one can get at
it."
"That's father. Oh, look, what fun! He's walking over our
heads! Father, father—I'm here in this hole."
"Wait one moment, and I'll come to you," said the child.
Roger let her go, but he stayed to close up the door and
window, and then followed. He found her at the door, telling
her story as fast as her little tongue could wag, to a well-
dressed man without a hat, who seemed greatly relieved at
having found her.
"Well, you came the wrong way, You little goose. Come
now, let us get home. Thank you, Read—look in with your
basket in the morning."
CHAPTER IV.
ROGER READ, FISHMONGER.
"It has been empty longer than that," said Mr. Allen,
taking back the key. "Did you find the shilling?"
"Yes, sir."
"It's a queer story, and many folk laugh at it; and for
my part I've lived next door for years and never saw
anything. I've heard noises, but laid them to the rats. Rats
are restless beasts, and it stands to reason that they'll
scamper about an empty house for diversion; when they
mean business, they come to me, worse, luck."
He did say "rats," and that with such energy that his
little terrier, peacefully dozing under the counter, sprang up
barking like a dog possessed, and flew at Roger, under the
impression that he was a rat in disguise. He was ashamed
of himself at once, for he and Roger were friends, and
retired, with a reproachful glance at his master.
The worst of this incident was, that Mr. Allen had to tell
many anecdotes, all indicating Chip's superior pluck and
wisdom, before he would return to the next door house.
However, Roger at last discovered that a milliner and
dressmaker had also given up the house because the old
man would go up and down the stairs and count his money;
also a fancy stationer. In fact, the shop, after changing
hands many times and getting into very low hands, had
been shut up, young Mr. Rider giving the key to Mr. Allen,
and saying that he would let it no more until these absurd
stories were forgotten.
"I wonder what he would ask for it?" said Roger eagerly.
"Mr. Allen, don't tell any one, because may be some one
would try to be beforehand with me. But I'd take it at
fifteen pounds a year, and do what wants doing myself. I
want to set up a fish shop, and am on the look-out for a
good chance. Old Rider won't disturb me, for I must sleep
at Sandsea!"
In big capitals. What if the letters were not all the same
height? What if the ER at the end had to be compressed
into a very narrow space? What if the three words were so
close together as to look more like one gigantic word than
three ordinary ones? Roger was aware of these faults, yet
he thought on the whole it looked well, and would do for the
present.
His first customer was Mrs. Wilson, who was going out
for a walk with her children, but stopped to admire the shop
and congratulate the new tradesman; also to buy a fish, for
which she said she would send in an hour or so.
But after that first day Roger got a little frightened. His
customers had no objection to coming to the shop, but they
objected to carrying the fish home, and he had no one to
send with it. He was obliged to engage a messenger, which
did not suit him at all, as he liked to do all his work for
himself, and was afraid of the expense. But there was no
help for it, and it turned out a very good move—though he
was constantly changing his boy, for he expected every one
to work as hard as he was willing to do himself; and the
boys, alas! had weak leanings towards marbles and tops,
and were constantly in scrapes.
"Do you think I may go in?" said he. "I'm busy all day,
and there are some things I do so want to learn."
"You're the man for Mr. Aylmer, then. Come along; I'm
afraid I'm late."
All this time Roger has never been described, nor does
the reader know his exact age. He was not very tall, but
well-made and strong-looking. He had a sensible, freckled
face, not handsome, but remarkably pleasant-looking;
honest blue eyes; and brown hair, which he kept cropped
very short. It was a bright, wide-awake face, but very
pleasant and honest-looking; and Mr. Aylmer felt inclined to
like the lad even before he spoke to him.
"And I am his son, and you are the boy about whom Sir
Carew was so unhappy, because, when your poor father's
death became known to him, he could not find you. One of
my brothers, who is in London, is on the look-out for you
still, for all I know. I thought there was a touch of old
Devon in your voice. Why did you not write to Sir Carew?"
"Babylon."
"Yes—and then he said, that if the Jews, being no better
than slaves and captives, were to seek the peace of that
city, how much more should men seek the peace of
England, their own native country, where all have rights and
privileges and all are free! And he gave a lot of texts, more
than I could remember afterwards, but I know he said that
the Lord Himself loved His native country, for He wept over
Jerusalem."
"I know it. And by degrees, either you must give in and
find something to do, or it will be found for you. You know
the old hymn,—
"Now for the third lodger. Why don't you make friends
with some of my lads? There are a few that I can
understand not liking; though, mind you, if you could help
them to improve, and don't, you are leaving a duty undone.
But Robert Brown and John Meyler, and one or two more,
would be good friends for you through life, and you would
be the better for their companionship even now."
"I'll do whatever you tell me, Mr. Aylmer, I know you are
right."
"The cricket, and good long walks when you can spare
time, will do just as well. By the way, we ought to be
walking homewards. No primroses for me to-night; but if
you keep your word, Roger, I shall not mind that."
"No fear, sir, I'll keep my word, and I'll try to get out of
my shell."
It was not long before Roger felt the benefit to both
mind and body which followed upon this determination. He
was a clever, thoughtful fellow, and the study of the history
of his native land led on to other studies; in fact, he became
so fond of reading, that his evenings seemed as much too
short as once they had seemed too long. He also took so
kindly to cricket that the two evenings in the week were not
grudged to it.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookname.com