The Gourmet iOS Developer's Cookbook : Even More Recipes for Better iOS App Development

The Gourmet iOS Developer's Cookbook : Even More Recipes for Better iOS App Development

  • ただいまウェブストアではご注文を受け付けておりません。 ⇒古書を探す
  • 製本 Paperback:紙装版/ペーパーバック版/ページ数 276 p.
  • 言語 ENG
  • 商品コード 9780134086224
  • DDC分類 005.268

Full Description


The Gourmet iOS Developer's Cookbook offers a fresh banquet of delicious cutting-edge iOS programming recipes for projects both big and small. Renowned iOS programming expert Erica Sadun brings together reliable, proven code for creating today's richest, most robust apps.Sadun presents innovative ways to make the most of AVFoundation, Text Kit, animation, adaptive interface programming, and much more. As in all of her iOS best-sellers, this pragmatic guide translates modern best practices into working code, distilling key concepts into recipes you can understand and build on.This is more than just cut-and-paste; using examples, Sadun offers a deep dive into the "how" and "why" of advanced iOS development. The code reflects iOS's latest capabilities, and every chapter groups related tasks together, so you can jump straight to your solution. Coverage includesProviding advanced speech generation and barcode recognition features through AVFoundationAutomatically updating app text presentation based on user preferences and expectationsExtending rich, flexible text throughout your apps with UIKit and Text KitSeamlessly migrating text designs between iOS screens and other destinationsGenerating attributed text strings from HTML sourcesIntegrating real-world physics for exciting animations and interactionsCreating better interfaces with dynamic animators--and overcoming their pitfallsAchieving greater visual impact with improved user alerts and popoversImplementing clever and compelling effects with non-rectangular viewsBuilding adaptive apps that gracefully respond to any iOS display, orientation, or screenStreamlining development with expert methods, functions, and techniquesExploring the core concepts you'll need to migrate successfully to SwiftThis book's source code is frequently updated by the author and can be downloaded at https://github.com/erica/iOS-Gourmet-Cookbook.

Contents

Preface xiiiChapter 1: Media 1Speech 1Other Options 3Delegate Callbacks 3Dictation 5Creating Barcodes 5Filter Parameters 5Building Codes 6Reading Barcodes 8Listening for Metadata Objects 10Responding to Metadata 11Extracting Bounds 13Enhancing Recognition 14Detecting Faces 14Building AVFoundation Movies 14Creating a Pixel Buffer 16Drawing into the Pixel Buffer 17Expressive Drawing 18Building Movies from Frames 19Adding Images to Movies 23Wrap-up 24Chapter 2: Dynamic Typography 25Type Size and User Needs 25How Dynamic Type Works 25Listening for Type Updates 28Handling Dynamic Type with Attributes 31Scanning for Text Style Ranges 32Applying Text Style Ranges 34Attribute-Ready Dynamic Elements 35Custom Fonts Faces 36Dynamic Text Views 37Custom Sizing 38Font Descriptors 39Descriptor Challenges 40Fonts with Multiple Variations 41Using String Attributes to Modify Fonts 42Dynamic Type Gotchas 43Wrap-up 43Chapter 3: Text Kit 45Creating Complex Text Layouts 45Glyphs 46Text Storage 55Layout Managers 56Text Containers 56Adaptive Flow 58Insets 60Exclusion Paths 60Bounding Rectangles 62Using Text Kit to Add Touch to Labels 63Establishing Text Kit 63Synchronizing 64Translating Coordinates 65Glyphs and Characters 66Checking for Links 67Adding Visual Feedback 67Draggable Exclusion Zones 69Building PDFs with Text Kit 71Printing Text View Data 73Printing PDF Data 74Wrap-up 74Chapter 4: Attributed Strings and Document Containers 75Class Enhancements 75String Attachments 77Building Attributed Strings from HTML 78Document Type Dictionaries 79Converting HTML Source to Attributed Strings 80Converting Attributed Strings to Document Representations 81Generating HTML from Attributed Strings 82Markup Initialization 83RTF and RTFD 83The RTFD Container 84Initializing Attributed Strings from a File 84Converting RTFD Text to Data 85Writing RTFD Containers from Data 86Inspecting Attributes 87Establishing Document Attributes 89Enhancing Attributed Strings 91Returning Copies with New Attributes 92Adjusting Attributes 93Extending Mutable Attributed Strings 94Text Ranges 95Calculating Positions 95Position Geometry 95Updating Selection Points 97Hardware Key Support 97Wrap-up 99Chapter 5: Animation 101Keyframe Animation 101Building Physics with Keyframes 103Blocking Animators 105UIKit Spring-Based Animations 106Practical Uses for Spring Animations 108System Animations 109Motion Effects 109Building Planes 110Shadow Effects 111Custom Transition Animations 113Delegation 114Building Transitioning Objects 114Implicit Animations 116Building an Animation-Ready Layer 116Building a View Around a Layer 118Timing 118Coordinating Animations 119Building Implicit Completion Blocks 120Animating Custom Properties 121Intercepting Updates 122Drawing Properties 123Wrap-up 124Chapter 6: Dynamic Animators 125Physics-Based Behaviors 125Building Dynamics 126Detecting Pauses 127Creating a Frame-Watching Dynamic Behavior 131Implementing Snap Zones 133Leveraging Real-World Physics 135Connecting a Gravity Behavior to Device Acceleration 137Creating Boundaries 138Enhancing View Dynamics 138Custom Behaviors 139Creating Custom Dynamic Items 139Subverting Dynamic Behaviors 141Better Custom Dynamic Behaviors 142Custom Secondary Behaviors 144Collection Views and Dynamic Animators 147Custom Flow Layouts 147Returning Layout Attributes 148Updating Behaviors 149Building a Dynamic Alert View 150Connecting Up the Jelly 150Drawing the View 152Deploying Jelly 154Wrap-up 154Chapter 7: Presentations 155Alerts 155Class Deprecations 155Building Alerts 156Enabling and Disabling Alert Buttons 161Adding Text Fields 162Mask Views 164Shape Layer Masking 164Building Mask Views 166Building Effect Views 169Building a Blur Effect 170Adding Vibrancy Effects 171Animating Effect Views 172Building Popovers 175Supporting Bubbles 176Presenting Popovers 177Wrap-up 177Chapter 8: Shape Magic 179How to Shape a View 179Expanding Beyond Circles 180Resizing Bezier Paths 180Building a Bezier-Based Shape Image View 184Working with Unclosed Shapes 185Adding Borders to Shaped Views 187Building Shaped Buttons 190Adding Attention-Grabbing Animations to Shaped Views 193Wrap-up 199Chapter 9: Adaptive Deployment 201Traits 201Trait Properties 202Defining Traits 202Combining Trait Collections 203Designing for Traits 204UIScreen Properties 205Coordinate Spaces 205Application Frame 206Screen Bounds 206Scale 207Rotation 207Size Classes and Assets 208Basic Deployment 208UIKit and Image Views 210The UIImageAsset Class 210Building Images from PDFs 211Overriding Trait Collections 214Building Side-by-Side iPhone Split Views 215A Bit More About iOS 8 Split View Controllers 218Wrap-up 219Chapter 10: Development Helpers 221All the Lorems 221Placeholder Text 221Image Ipsums 223Generating Random User Data 225Bulk Names 225Generating Random Feeds 227Random Everything 228Directives 229Converting Comments to Warnings 229Warnings 231Testing for the Simulator 232Errors 232Testing for Inclusion 233Messages 234Wrapping Pragmas 234Overriding Diagnostics 235Unused Variable Warnings 235Marking Non-null and Nullable Items 236Developer Tweaks 236Saving Files from the Simulator 237Tighter Logging 238Wrap-up 238Chapter 11: A Taste of Swift 239Swift Versus Objective-C 239Building iOS Apps in Swift 240Optionals 243Inferred Types 244The Optional Enumeration 245Unwrapping Optionals 246Assigning Values to Non-optionals 248Cocoa Touch Patterns 248Hybrid Language Development 251Calling Objective-C from Swift 252Accessing Classes 252Calling Swift from Objective-C 253Preparing Swift for Objective-C 254Class Descent 255Building the Basics 256Watching Progress 257Learning Swift 259Wrap-up 260Index 261

最近チェックした商品