HAPPY BOOKSGIVING
Use code BOOKSGIVING during checkout to save 40%-55% on books and eBooks. Shop now.
Register your product to gain access to bonus material or receive a coupon.
The Advanced iOS 6 Developer’s Cookbook brings together reliable, proven solutions for cutting-edge iOS 6 development. World-renowned iOS expert Erica Sadun covers device-specific development, document/data sharing, Core Text, networking, image processing, onboard cameras, audio, Address Book, Core Location, GameKit,StoreKit, push notifications, and more.
As in her previous bestselling iOS books, Sadun translates today’s development best practices into working code, distilling key concepts into concise recipes that are easy to understand and transfer into your own projects. This isn’t just cut and paste. Using her examples, Sadun fully explains both the “how” and “why” of advanced and specialized iOS 6 development.
All code is tested with iOS 6 features and iPhone, iPad, and iPod touch capabilities. Throughout, 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
Erica Sadun's Roadmap to Mac/iOS Development
Visit the websites associated with The Advanced iOS 6 Developer's Cookbook: ericasadun.com and egithub.com.
Optimizing Device-Specific iOS Development
Download the sample pages (includes Chapter 1 and Index)
Preface xiii
1 Device-Specific Development 1
Accessing Basic Device Information 1
Adding Device Capability Restrictions 2
Recipe: Checking Device Proximity and Battery States 5
Recipe: Recovering Additional Device Information 9
Recipe: Using Acceleration to Locate “Up” 11
Working with Basic Orientation 12
Retrieving the Current Accelerometer Angle Synchronously 13
Recipe: Using Acceleration to Move Onscreen Objects 16
Recipe: Accelerometer-Based Scroll View 19
Recipe: Core Motion Basics 21
Recipe: Retrieving and Using Device Attitude 26
Detecting Shakes Using Motion Events 27
Recipe: Using External Screens 29
Tracking Users 35
One More Thing: Checking for Available Disk Space 35
Summary 36
2 Documents and Data Sharing 39
Recipe: Working with Uniform Type Identifiers 39
Recipe: Accessing the System Pasteboard 45
Recipe: Monitoring the Documents Folder 48
Recipe: Presenting the Activity View Controller 54
Recipe: The Quick Look Preview Controller 63
Recipe: Adding a QuickLook Action 66
Recipe: Using The Document Interaction Controller 69
Recipe: Declaring Document Support 75
Recipe: Creating URL-Based Services 82
Summary 84
3 Core Text 87
Core Text and iOS 87
Attributed Strings 89
Recipe: Basic Attributed Strings 93
Recipe: Mutable Attributed Strings 95
The Mystery of Responder Styles 98
Recipe: Attribute Stacks 100
Recipe: Using Pseudo-HTML to Create Attributed Text 105
Drawing with Core Text 109
Creating Image Cut-Outs 112
Recipe: Drawing Core Text onto a Scroll View 114
Recipe: Exploring Fonts 116
Adding Custom Fonts to Your App 118
Recipe: Splitting Core Text into Pages 119
Recipe: Drawing Attributed Text into a PDF 120<