***This is the updated and corrected edition ofThe iOS 5 Developer's Cookbook.*** The iOS 5 Developer's Cookbook, Third Edition Covers iOS 5, Xcode 4.2, Objective-C 2.0's ARC, LLVM, and more! In this book, bestselling author and iOS development guru Erica Sadun brings together all the information you need to quickly start building successful iOS apps for iPhone, iPad, and iPod touch. Sadun has thoroughly revised this book to focus on powerful new iOS 5 features, the latest version of Objective-C, and the Xcode 4 development tools. The iOS 5 Developer's Cookbook, Third Edition is packed with ready-made code solutions for the iOS 5 development challenges you're most likely to face, eliminating trial-and-error and helping you build reliable apps from the very beginning. Sadun teaches each new concept and technique through robust code that is easy to reuse and extend. This isn't just cut-and-paste: Using her examples, Sadun fully explains both the "how" and "why" of effective iOS 5 development. Sadun's tested recipes address virtually every major area of iOS development, from user interface design to view controllers, gestures and touch, to networking and security. Every chapter groups related tasks together, so you can jump straight to your solution, without having to identify the right class or framework first. Coverage includes: * Mastering the iOS 5 SDK, Objective-C essentials, and the iOS development lifecycle * Designing and customizing interfaces with Interface Builder and Objective-C * Organizing apps with view controllers, views, and animations featuring the latest Page View controllers and custom containers * Making the most of touch and gestures--including custom gesture recognizers * Building and using controls from the ground up * Working with Core Image and Core Text * Implementing fully featured Table View edits, reordering, and custom cells * Creating managed database stores; then adding, deleting, querying, and displaying data * Alerting users with dialogs, progress bars, local and push notifications, popovers, and pings * Requesting and using feedback * Connecting to networks and services, handling authentication, and managing downloads * Deploying apps to devices, testers, and the App Store
| ISBN | 0321832078 | | Pages | 840 | | ISBN13 | 9780321832078 (What's this?) | | Weight (grammes) | 1250 | | Publisher | Pearson Education (US) | | Published in | New Jersey | | Imprint | Addison-Wesley Educational Publishers Inc | | Previous ISBN | 9780321659576 | | Format | Paperback | | Height (mm) | 229 | | Publication date | 18 Jan 2012 | | Width (mm) | 178 | | DEWEY | 004.167 | | Spine width (mm) | 43 | | DEWEY edition | DC23 | | Academic level | Professional / Scholarly |
|
|
|
Preface xxvii 1 Introducing the iOS SDK 1 iOS Developer Programs 1 Online Developer Program 2 Standard Developer Program 2 Developer Enterprise Program 3 Developer University Program 3 Registering 3 Getting Started 3 Downloading the SDK 4 Development Devices 5 Simulator Limitations 6 Tethering 7 Understanding Model Differences 8 Screen Size 9 Camera 9 Audio 10 Telephony 10 Core Location and Core Motion Differences 10 Vibration Support and Proximity 11 Processor Speeds 11 OpenGL ES 11 Platform Limitations 12 Storage Limits 12 Data Access Limits 13 Memory Limits 13 Interaction Limits 16 Energy Limits 16 Application Limits 17 User Behavior Limits 18 SDK Limitations 18 Using the Provisioning Portal 19 Setting Up Your Team 19 Requesting Certificates 20 Registering Devices 20 Registering Application Identifiers 21 Provisioning 22 Putting Together iPhone Projects 23 The iPhone Application Skeleton 25 main.m 26 Application Delegate 28 View Controller 30 A Note about the Sample Code in This Book 31 iOS Application Components 32 Application Folder Hierarchy 32 The Executable 32 The Info.plist File 33 The Icon and Launch Images 34 Interface Builder Files 37 Files Not Found in the Application Bundle 37 IPA Archives 38 Sandboxes 38 Programming Paradigms 39 Object-Oriented Programming 39 Model-View-Controller 40 Summary 48 2 Objective-C Boot Camp 51 The Objective-C Programming Language 51 Classes and Objects 52 Creating Objects 54 Memory Allocation 54 Releasing Memory 55 Understanding Retain Counts with MRR 56 Methods, Messages, and Selectors 57 Undeclared Methods 57 Pointing to Objects 58 Inheriting Methods 59 Declaring Methods 59 Implementing Methods 60 Class Methods 62 Fast Enumeration 63 Class Hierarchy 63 Logging Information 64 Basic Memory Management 66 Managing Memory with MRR 67 Managing Memory with ARC 70 Properties 71 Encapsulation 71 Dot Notation 71 Properties and Memory Management 72 Declaring Properties 73 Creating Custom Getters and Setters 74 Property Qualifiers 76 Key-Value Coding 78 Key-Value Observing 79 MRR and High Retain Counts 79 Other Ways to Create Objects 80 Deallocating Objects 82 Using Blocks 84 Defining Blocks in Your Code 85 Assigning Block References 85 Blocks and Local Variables 87 Blocks and typedef 87 Blocks and Memory Management with MRR 88 Other Uses for Blocks 88 Getting Up to Speed with ARC 88 Property and Variable Qualifiers 89 Reference Cycles 92 Autorelease Pools 94 Opting into and out of ARC 95 Migrating to ARC 95 Disabling ARC across a Target 96 Disabling ARC on a File-by-File Basis 97 Creating an ARC-less Project from Xcode Templates 97 ARC Rules 98 Using ARC with Core Foundation and Toll Free Bridging 99 Casting between Objective-C and Core Foundation 99 Choosing a Bridging Approach 101 Runtime Workarounds 102 Tips and Tricks for Working with ARC 103 Crafting Singletons 103 Categories (Extending Classes) 104 Protocols 106 Defining a Protocol 106 Incorporating a Protocol 107 Adding Callbacks 107 Declaring Optional Callbacks 107 Implementing Optional Callbacks 108 Conforming to a Protocol 108 Foundation Classes 109 Strings 110 Numbers and Dates 115 Collections 117 One More Thing: Message Forwarding 123 Implementing Message Forwarding 123 House Cleaning 125 Super-easy Forwarding 126 Summary 126 3 Building Your First Project 127 Creating New Projects 127 Building Hello World the Template Way 129 Create a New Project 129 Introducing the Xcode Workspace 132 Review the Project 137 Open the iPhone Storyboard 138 Edit the View 140 Run Your Application 141 Using the Simulator 142 Simulator: Behind the Scenes 144 Sharing Simulator Applications 146 The Minimalist Hello World 146 Browsing the SDK APIs 149 Converting Interface Builder Files to Their Objective-C Equivalents 151 Using the Debugger 153 Set a Breakpoint 153 Open the Debugger 154 Inspect the Label 155 Set Another Breakpoi