ebook img

IOS SDK Programming a Beginners Guide PDF

529 Pages·2011·15.213 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview IOS SDK Programming a Beginners Guide

www.it-ebooks.info iOS SDK Programming: A Beginner’s Guide www.it-ebooks.info About the Authors James A. Brannan is a senior developer with more than 15 years of experience. He has developed using everything from AWK, to Visual Basic, to Java. His current interests are iOS, Blackberry, Android, and Adobe Flex/Flash. He is only $999,000 short of being the next app store overnight millionaire. He lives in Gaithersburg, Maryland, with his wife, two kids, two Macs, and bicycle. Blake Ward has a PhD in Computer Science from Carnegie Mellon University and has spent more than 30 years programming and managing software development. He has developed for a wide variety of mobile devices, ranging from the Apple Newton and Palm Pilot to RIM’s Blackberry, the iPhone and iPad, and Android phones. Blake has worked as a researcher and in management at Apple, Xerox PARC, and numerous startups. He is currently an independent iPhone and Android developer, available through www.iphoneappquotes.com. About the Technical Editor Born to golf, forced to work, Steven Weber, a Java Web Applications engineer, has ten years application development under his belt. He’s dabbled in iOS application development and released one corporate application since the launch of Apple’s App Store. He’s currently living it up in the Colorado Rockies. www.it-ebooks.info iOS SDK Programming: A Beginner’s Guide James A. Brannan Blake Ward New York Chicago San Francisco Lisbon London Madrid Mexico City Milan New Delhi San Juan Seoul Singapore Sydney Toronto www.it-ebooks.info Copyright © 2011 by The McGraw-Hill Companies. All rights reserved. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher. ISBN: 978-0-07-175909-0 MHID: 0-07-175909-3 The material in this eBook also appears in the print version of this title: ISBN: 978-0-07-175908-3, MHID: 0-07-175908-5. All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trademarked name, we use names in an editorial fashion only, and to the benefi t of the trademark owner, with no intention of infringement of the trademark. Where such designations appear in this book, they have been printed with initial caps. McGraw-Hill eBooks are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate training programs. To contact a representative please e-mail us at [email protected]. Information has been obtained by McGraw-Hill from sources believed to be reliable. However, because of the possibility of human or mechanical error by our sources, McGraw-Hill, or others, McGraw-Hill does not guarantee the accuracy, adequacy, or completeness of any information and is not responsible for any errors or omissions or the results obtained from the use of such information. TERMS OF USE This is a copyrighted work and The McGraw-Hill Companies, Inc. (“McGrawHill”) and its licensors reserve all rights in and to the work. Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hill’s prior consent. You may use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right to use the work may be terminated if you fail to comply with these terms. THE WORK IS PROVIDED “AS IS.” McGRAW-HILL AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill and its licensors do not warrant or guarantee that the functions contained in the work will meet your requirements or that its operation will be uninterrupted or error free. Neither McGraw-Hill nor its licensors shall be liable to you or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. McGraw-Hill has no responsibility for the content of any information accessed through the work. Under no circumstances shall McGraw-Hill and/or its licensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use of or inability to use the work, even if any of them has been advised of the possibility of such damages. This limitation of liability shall apply to any claim or cause whatsoever whether such claim or cause arises in contract, tort or otherwise. www.it-ebooks.info For Timothy Hill and Doctor Ronald Holt. This book is not some lofty political or anthropological treatise, but it was fun writing. —James For Bryce—the real author in our family. —Blake www.it-ebooks.info This page intentionally left blank www.it-ebooks.info Contents at a Glance 1 The iOS Software Development Kit (SDK) ............................... 1 2 A C Refresher ............................................................. 25 3 Just Enough Objective-C: Part One ...................................... 41 4 Just Enough Objective-C: Part Two ...................................... 61 5 Deploying to an iPhone, Debugging, and Testing .......................... 77 6 UIApplication and UIApplicationDelegate ................................ 109 7 UIView and UIViewController ............................................ 127 8 UITabBar and UITabBarController ...................................... 141 9 UINavigationBar and UINavigationController ........................... 159 10 Tables Using UITableView and UITableViewController .................. 185 11 Activity Progress and Alerting Users ...................................... 237 12 Controls—Part One: Using Buttons, Sliders, Switches, and Text Fields .......................................................... 263 vii www.it-ebooks.info viii iOS SDK Programming: A Beginner’s Guide 13 Controls—Part Two: Using Pickers and Using the Camera .............. 295 14 Application Settings ....................................................... 329 15 Property Lists and Archiving ............................................. 349 16 Data Persistence Using SQLite ............................................ 371 17 Core Data .................................................................. 399 18 Multimedia ................................................................ 435 19 Universal Applications for the iPad ....................................... 457 Index ...................................................................... 485 www.it-ebooks.info Contents ACKNOWLEDGMENTS ........................................................... xvii INTRODUCTION .................................................................. xix 1 The iOS Software Development Kit (SDK) ............................... 1 The App Store ...................................................................... 2 The Software Development Kit (SDK) .............................................. 4 Paid Membership ............................................................. 5 Objective-C, Foundation Framework, Cocoa Touch, and UIKit ...................... 5 Cocoa Touch ................................................................. 6 Foundation Framework ....................................................... 6 The iOS Frameworks ......................................................... 6 Memory and Processor Speed ................................................. 8 Small Screen ................................................................. 8 Security ...................................................................... 9 Short-Lived Applications ..................................................... 9 Manual Memory Management ................................................ 9 Relevant Documentation ............................................................ 9 Try This: Getting a Quick Start on iOS Development ................................ 10 Summary ........................................................................... 23 2 A C Refresher ............................................................. 25 C Command-Line Programs ........................................................ 27 Try This: Creating a Simple C Program Using Xcode ............................... 27 ix www.it-ebooks.info

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.