Author(s): Marin Todorov
Edition: 3rd Edition
Publisher: Razeware
Year: 2016
Language: English
Pages: 395
Tags: iOS, swift, animations
Table of Contents : Extended......Page 7
Introduction......Page 13
Who this book is for......Page 14
What’s in store......Page 15
Source code and forums......Page 16
License......Page 17
About the cover......Page 18
Section I: View Animations......Page 19
Chapter 1: Getting Started with View Animations......Page 22
Your first animation......Page 23
Animatable properties......Page 27
Animation options......Page 29
Challenges......Page 33
Chapter 2: Springs......Page 35
Spring animations......Page 36
Animating user interactions......Page 39
Challenges......Page 42
Example transitions......Page 44
Mixing in transitions......Page 48
Challenges......Page 52
Chapter 4: View Animations in Practice......Page 57
Crossfading animations......Page 58
Cube transitions......Page 61
Fade and bounce transitions......Page 65
Challenges......Page 67
Chapter 5: Keyframe animations......Page 69
Keyframe animations......Page 70
Challenges......Page 76
Section II: Auto Layout......Page 78
Chapter 6: Introduction to Auto Layout......Page 80
Auto Layout to the rescue......Page 82
Auto Layout Constraints......Page 83
Finalizing the UI......Page 95
Challenges......Page 98
Chapter 7: Animating Constraints......Page 99
Animating Interface Builder constraints......Page 100
Inspecting and animating constraints......Page 105
Animating by replacing constraints......Page 108
Adding menu content......Page 112
Animating dynamically created views......Page 113
Challenges......Page 117
Section III: Layer Animations......Page 118
Animatable properties......Page 121
Your first layer animation......Page 124
More elaborate layer animations......Page 127
Debugging basic animations......Page 131
Animations vs. real content......Page 134
Best practices......Page 137
Challenges......Page 138
Introducing animation delegates......Page 142
Key-value coding compliance......Page 143
Animation Keys......Page 146
Challenge......Page 150
CAAnimationGroup......Page 153
Animation easing......Page 155
More timing options......Page 157
Challenges......Page 160
Damped harmonic oscillators......Page 162
UIKit vs. Core Animation springs......Page 165
Creating your first layer spring animation......Page 166
Spring animation properties......Page 168
Specific layer properties......Page 172
Challenges......Page 173
Introducing keyframe animations......Page 174
Creating a layer keyframe animation......Page 175
Animating struct values......Page 176
Intermediate keyframe animations......Page 178
Chapter 13: Shapes and Masks......Page 180
Finishing up the avatar view......Page 182
Creating the bounce-off animation......Page 184
Morphing shapes......Page 187
Challenges......Page 189
Chapter 14: Gradient Animations......Page 193
Drawing your first gradient......Page 194
Animating gradients......Page 196
Creating a text mask......Page 198
Challenges......Page 199
Chapter 15: Stroke and path animations......Page 201
Creating interactive stroke animations......Page 202
Animating both stroke ends......Page 205
Creating path keyframe animations......Page 207
Section conclusion......Page 209
Chapter 16: Replicating Animations......Page 210
Replicating like rabbits......Page 212
Replicating multiple animations......Page 217
Animating CAReplicatorLayer properties......Page 219
Interactive replication animations......Page 223
Challenges......Page 226
Section IV: View Controller Transition Animations......Page 227
Chapter 17: Presentation Controller & Orientation Animations......Page 229
Looking through the starter project......Page 230
Behind the scenes of custom transitions......Page 231
Implementing transition delegates......Page 232
Creating your transition animator......Page 235
Device orientation transition......Page 245
Challenges......Page 247
Chapter 18: UINavigationController Custom Transition Animations......Page 249
Introducing Logo Reveal......Page 250
Custom navigation transitions......Page 252
The navigation controller delegate......Page 253
Adding a custom reveal animation......Page 255
Taking care of the rough edges......Page 258
Challenges......Page 261
Chapter 19: Interactive UINavigationController Transitions......Page 263
Handling the pan gesture......Page 264
Using interactive animator classes......Page 265
Calculating your animation’s progress......Page 267
Handling early termination......Page 269
Challenges......Page 272
Section V: Animations with UIViewPropertyAnimator......Page 273
Chapter 20: Getting Started with UIViewPropertyAnimator......Page 275
Basic animations......Page 276
Abstracting animations away......Page 280
Running animators......Page 281
Basic keyframe animations......Page 284
Challenges......Page 287
Chapter 21: Intermediate Animations with UIViewPropertyAnimator......Page 290
Custom animation timing......Page 291
Auto Layout animations......Page 299
Built-in view transitions......Page 303
Challenges......Page 304
Chapter 22: Interactive Animations with UIViewPropertyAnimator......Page 306
An animation state machine......Page 307
Interactive 3D touch animation......Page 309
Challenges......Page 320
Static view controller transitions......Page 323
Interactive view controller transitions......Page 330
Interruptible transition animations......Page 335
Section VI: 3D Animations......Page 339
Chapter 24: Simple 3D Animations......Page 343
Creating 3D transformations......Page 344
Challenges......Page 351
Chapter 25: Intermediate 3D animations......Page 353
Exploring the starter project......Page 354
Transforming the gallery......Page 357
Animating the gallery......Page 361
Bringing an image to the front......Page 362
Challenges......Page 365
Section VII: Further Types of Animations......Page 366
Chapter 26: Particle Emitters......Page 368
Creating your emitter layer......Page 369
Controlling your particles......Page 374
Adding some final polish......Page 382
Challenges......Page 383
Chapter 27: Frame Animations with UIImageView......Page 385
Project basics......Page 386
Setting up your frame animation......Page 387
Translating your view......Page 390
Playing different frame animations......Page 391
Where to go from here?......Page 394
Conclusion......Page 395