Für diesen Artikel ist leider kein Bild verfügbar.

Gourmet iOS Developer's Cookbook, The

Even More Recipes for Better iOS App Development

Erica Sadun (Autor)


Addison Wesley (Hersteller)
978-0-13-408515-9 (ISBN)
24,90 inkl. MwSt
  • Keine Verlagsinformationen verfügbar
  • Artikel merken
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 includes


Providing advanced speech generation and barcode recognition features through AVFoundation
Automatically updating app text presentation based on user preferences and expectations
Extending rich, flexible text throughout your apps with UIKit and Text Kit
Seamlessly migrating text designs between iOS screens and other destinations
Generating attributed text strings from HTML sources
Integrating real-world physics for exciting animations and interactions
Creating better interfaces with dynamic animators--and overcoming their pitfalls
Achieving greater visual impact with improved user alerts and popovers
Implementing clever and compelling effects with non-rectangular views
Building adaptive apps that gracefully respond to any iOS display, orientation, or screen
Streamlining development with expert methods, functions, and techniques
Exploring the core concepts you'll need to migrate successfully to Swift


This book's source code is frequently updated by the author and can be downloaded at https://github.com/erica/iOS-Gourmet-Cookbook.

Erica Sadun is the bestselling author, coauthor, and contributor to several dozen books on programming, digital video and photography, and web design, including the widely popular The Core iOS 6 Developer's Cookbook, Fourth Edition. She has blogged at TUAW.com, O'Reilly's Mac Devcenter, Lifehacker, and Ars Technica. In addition to being the author of dozens of iOS-native applications, Erica holds a Ph.D. in computer science from Georgia Tech's Graphics, Visualization and Usability Center. A geek, a programmer, and an author, she's never met a gadget she didn't love. When not writing, she and her geek husband parent three geeks-in-training, who regard their parents with restrained bemusement when they're not busy rewiring the house or plotting global domination.

Preface xiii

Chapter 1: Media 1



Speech 1

Other Options 3

Delegate Callbacks 3

Dictation 5

Creating Barcodes 5

Filter Parameters 5

Building Codes 6

Reading Barcodes 8

Listening for Metadata Objects 10

Responding to Metadata 11

Extracting Bounds 13

Enhancing Recognition 14

Detecting Faces 14

Building AVFoundation Movies 14

Creating a Pixel Buffer 16

Drawing into the Pixel Buffer 17

Expressive Drawing 18

Building Movies from Frames 19

Adding Images to Movies 23

Wrap-up 24

Chapter 2: Dynamic Typography 25

Type Size and User Needs 25

How Dynamic Type Works 25

Listening for Type Updates 28

Handling Dynamic Type with Attributes 31

Scanning for Text Style Ranges 32

Applying Text Style Ranges 34

Attribute-Ready Dynamic Elements 35

Custom Fonts Faces 36

Dynamic Text Views 37

Custom Sizing 38

Font Descriptors 39

Descriptor Challenges 40

Fonts with Multiple Variations 41

Using String Attributes to Modify Fonts 42

Dynamic Type Gotchas 43

Wrap-up 43

Chapter 3: Text Kit 45

Creating Complex Text Layouts 45

Glyphs 46

Text Storage 55

Layout Managers 56

Text Containers 56

Adaptive Flow 58

Insets 60

Exclusion Paths 60

Bounding Rectangles 62

Using Text Kit to Add Touch to Labels 63

Establishing Text Kit 63

Synchronizing 64

Translating Coordinates 65

Glyphs and Characters 66

Checking for Links 67

Adding Visual Feedback 67

Draggable Exclusion Zones 69

Building PDFs with Text Kit 71

Printing Text View Data 73

Printing PDF Data 74

Wrap-up 74

Chapter 4: Attributed Strings and Document Containers 75

Class Enhancements 75

String Attachments 77

Building Attributed Strings from HTML 78

Document Type Dictionaries 79

Converting HTML Source to Attributed Strings 80

Converting Attributed Strings to Document Representations 81

Generating HTML from Attributed Strings 82

Markup Initialization 83

RTF and RTFD 83

The RTFD Container 84

Initializing Attributed Strings from a File 84

Converting RTFD Text to Data 85

Writing RTFD Containers from Data 86

Inspecting Attributes 87

Establishing Document Attributes 89

Enhancing Attributed Strings 91

Returning Copies with New Attributes 92

Adjusting Attributes 93

Extending Mutable Attributed Strings 94

Text Ranges 95

Calculating Positions 95

Position Geometry 95

Updating Selection Points 97

Hardware Key Support 97

Wrap-up 99

Chapter 5: Animation 101

Keyframe Animation 101

Building Physics with Keyframes 103

Blocking Animators 105

UIKit Spring-Based Animations 106

Practical Uses for Spring Animations 108

System Animations 109

Motion Effects 109

Building Planes 110

Shadow Effects 111

Custom Transition Animations 113

Delegation 114

Building Transitioning Objects 114

Implicit Animations 116

Building an Animation-Ready Layer 116

Building a View Around a Layer 118

Timing 118

Coordinating Animations 119

Building Implicit Completion Blocks 120

Animating Custom Properties 121

Intercepting Updates 122

Drawing Properties 123

Wrap-up 124

Chapter 6: Dynamic Animators 125

Physics-Based Behaviors 125

Building Dynamics 126

Detecting Pauses 127

Creating a Frame-Watching Dynamic Behavior 131

Implementing Snap Zones 133

Leveraging Real-World Physics 135

Connecting a Gravity Behavior to Device Acceleration 137

Creating Boundaries 138

Enhancing View Dynamics 138

Custom Behaviors 139

Creating Custom Dynamic Items 139

Subverting Dynamic Behaviors 141

Better Custom Dynamic Behaviors 142

Custom Secondary Behaviors 144

Collection Views and Dynamic Animators 147

Custom Flow Layouts 147

Returning Layout Attributes 148

Updating Behaviors 149

Building a Dynamic Alert View 150

Connecting Up the Jelly 150

Drawing the View 152

Deploying Jelly 154

Wrap-up 154

Chapter 7: Presentations 155

Alerts 155

Class Deprecations 155

Building Alerts 156

Enabling and Disabling Alert Buttons 161

Adding Text Fields 162

Mask Views 164

Shape Layer Masking 164

Building Mask Views 166

Building Effect Views 169

Building a Blur Effect 170

Adding Vibrancy Effects 171

Animating Effect Views 172

Building Popovers 175

Supporting Bubbles 176

Presenting Popovers 177

Wrap-up 177

Chapter 8: Shape Magic 179

How to Shape a View 179

Expanding Beyond Circles 180

Resizing Bezier Paths 180

Building a Bezier-Based Shape Image View 184

Working with Unclosed Shapes 185

Adding Borders to Shaped Views 187

Building Shaped Buttons 190

Adding Attention-Grabbing Animations to Shaped Views 193

Wrap-up 199

Chapter 9: Adaptive Deployment 201

Traits 201

Trait Properties 202

Defining Traits 202

Combining Trait Collections 203

Designing for Traits 204

UIScreen Properties 205

Coordinate Spaces 205

Application Frame 206

Screen Bounds 206

Scale 207

Rotation 207

Size Classes and Assets 208

Basic Deployment 208

UIKit and Image Views 210

The UIImageAsset Class 210

Building Images from PDFs 211

Overriding Trait Collections 214

Building Side-by-Side iPhone Split Views 215

A Bit More About iOS 8 Split View Controllers 218

Wrap-up 219

Chapter 10: Development Helpers 221

All the Lorems 221

Placeholder Text 221

Image Ipsums 223

Generating Random User Data 225

Bulk Names 225

Generating Random Feeds 227

Random Everything 228

Directives 229

Converting Comments to Warnings 229

Warnings 231

Testing for the Simulator 232

Errors 232

Testing for Inclusion 233

Messages 234

Wrapping Pragmas 234

Overriding Diagnostics 235

Unused Variable Warnings 235

Marking Non-null and Nullable Items 236

Developer Tweaks 236

Saving Files from the Simulator 237

Tighter Logging 238

Wrap-up 238

Chapter 11: A Taste of Swift 239

Swift Versus Objective-C 239

Building iOS Apps in Swift 240

Optionals 243

Inferred Types 244

The Optional Enumeration 245

Unwrapping Optionals 246

Assigning Values to Non-optionals 248

Cocoa Touch Patterns 248

Hybrid Language Development 251

Calling Objective-C from Swift 252

Accessing Classes 252

Calling Swift from Objective-C 253

Preparing Swift for Objective-C 254

Class Descent 255

Building the Basics 256

Watching Progress 257

Learning Swift 259

Wrap-up 260

Index 261

Verlagsort Boston
Sprache englisch
Gewicht 1 g
ISBN-10 0-13-408515-9 / 0134085159
ISBN-13 978-0-13-408515-9 / 9780134085159
Zustand Neuware
Haben Sie eine Frage zum Produkt?