logo资料库

iOS_Animations_by_Tutorials V3.1.pdf

第1页 / 共395页
第2页 / 共395页
第3页 / 共395页
第4页 / 共395页
第5页 / 共395页
第6页 / 共395页
第7页 / 共395页
第8页 / 共395页
资料共395页,剩余部分请下载后查看
Table of Contents : Extended
Introduction
What you need
Who this book is for
How to use this book
What’s in store
Source code and forums
Book updates
License
About the cover
Section I: View Animations
Chapter 1: Getting Started with View Animations
Your first animation
Animatable properties
Animation options
Challenges
Chapter 2: Springs
Spring animations
Animating user interactions
Challenges
Chapter 3: Transitions
Example transitions
Mixing in transitions
Challenges
Chapter 4: View Animations in Practice
Crossfading animations
Cube transitions
Fade and bounce transitions
Challenges
Chapter 5: Keyframe animations
Keyframe animations
Challenges
Section II: Auto Layout
Chapter 6: Introduction to Auto Layout
Auto Layout to the rescue
Auto Layout Constraints
Finalizing the UI
Challenges
Chapter 7: Animating Constraints
Animating Interface Builder constraints
Inspecting and animating constraints
Animating by replacing constraints
Adding menu content
Animating dynamically created views
Challenges
Section III: Layer Animations
Chapter 8: Getting Started with Layer Animations
Animatable properties
Your first layer animation
More elaborate layer animations
Debugging basic animations
Animations vs. real content
Best practices
Challenges
Chapter 9: Animation Keys and Delegates
Introducing animation delegates
Key-value coding compliance
Animation Keys
Challenge
Chapter 10: Groups and Advanced Timing
CAAnimationGroup
Animation easing
More timing options
Challenges
Chapter 11: Layer Springs
Damped harmonic oscillators
UIKit vs. Core Animation springs
Creating your first layer spring animation
Spring animation properties
Specific layer properties
Challenges
Chapter 12: Layer Keyframe Animations and Struct Properties
Introducing keyframe animations
Creating a layer keyframe animation
Animating struct values
Intermediate keyframe animations
Chapter 13: Shapes and Masks
Finishing up the avatar view
Creating the bounce-off animation
Morphing shapes
Challenges
Chapter 14: Gradient Animations
Drawing your first gradient
Animating gradients
Creating a text mask
Challenges
Chapter 15: Stroke and path animations
Creating interactive stroke animations
Animating both stroke ends
Creating path keyframe animations
Section conclusion
Chapter 16: Replicating Animations
Replicating like rabbits
Replicating multiple animations
Animating CAReplicatorLayer properties
Interactive replication animations
Challenges
Section IV: View Controller Transition Animations
Chapter 17: Presentation Controller & Orientation Animations
Looking through the starter project
Behind the scenes of custom transitions
Implementing transition delegates
Creating your transition animator
Device orientation transition
Challenges
Chapter 18: UINavigationController Custom Transition Animations
Introducing Logo Reveal
Custom navigation transitions
The navigation controller delegate
Adding a custom reveal animation
Taking care of the rough edges
Challenges
Chapter 19: Interactive UINavigationController Transitions
Creating an interactive transition
Handling the pan gesture
Using interactive animator classes
Calculating your animation’s progress
Handling early termination
Challenges
Section V: Animations with UIViewPropertyAnimator
Chapter 20: Getting Started with UIViewPropertyAnimator
Basic animations
Abstracting animations away
Running animators
Basic keyframe animations
Challenges
Chapter 21: Intermediate Animations with UIViewPropertyAnimator
Custom animation timing
Auto Layout animations
Built-in view transitions
Challenges
Chapter 22: Interactive Animations with UIViewPropertyAnimator
An animation state machine
Interactive 3D touch animation
Challenges
Chapter 23: UIViewPropertyAnimator View Controller Transitions
Static view controller transitions
Interactive view controller transitions
Interruptible transition animations
Section VI: 3D Animations
Chapter 24: Simple 3D Animations
Creating 3D transformations
Challenges
Chapter 25: Intermediate 3D animations
Exploring the starter project
Transforming the gallery
Animating the gallery
Bringing an image to the front
Challenges
Section VII: Further Types of Animations
Chapter 26: Particle Emitters
Creating your emitter layer
Controlling your particles
Adding some final polish
Challenges
Chapter 27: Frame Animations with UIImageView
Project basics
Setting up your frame animation
Translating your view
Playing different frame animations
Where to go from here?
Conclusion
iOS Animations by Tutorials iOS Animations by Tutorials Third Edition Marin Todorov Copyright ©2016 Razeware LLC. Notice of Rights All rights reserved. No part of this book or corresponding materials (such as text, images, or source code) may be reproduced or distributed by any means without prior written permission of the copyright owner. Notice of Liability This book and all corresponding materials (such as source code) are provided on an "as is" basis, without warranty of any kind, express of implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in action of contract, tort or otherwise, arising from, out of or in connection with the software or the use of other dealing in the software. Trademarks All trademarks and registered trademarks appearing in this book are the property of their own respective owners. raywenderlich.com 2
iOS Animations by Tutorials Dedications "To my father." — Marin Todorov raywenderlich.com 3
iOS Animations by Tutorials About the team Marin Todorov is the author of this book. Marin is one of the founding members of the raywenderlich.com tutorial team. He is an independent iOS consultant and publisher, and also has a background in web and desktop development. Besides crafting code, Marin also enjoys blogging, writing books and speaking at conferences. He happily open sources code. Erik Kerber is the tech editor of this book. Erik is a software developer in Minneapolis, MN, and the lead iOS developer for the Target app. He does his best to balance a life behind the keyboard with cycling, hiking, scuba diving, and traveling. Rich Turton is an iOS developer for MartianCraft, prolific Stack Overflow participant and author of a development blog, Command Shift. When he's not in front of a computer he is usually building Lego horse powered spaceships (don't ask!) with his daughter. Chris Belanger is the editor of this book. Chris is the Book Team Lead and Lead Editor for raywenderlich.com. If there are words to wrangle or a paragraph to ponder, he‘s on the case. When he kicks back, you can usually find Chris with guitar in hand, looking for the nearest beach, or exploring the lakes and rivers in his part of the world in a canoe. Vicki Wenderlich created many of the illustrations in this book. Vicki discovered a love of digital art many years ago, and has been making app art and digital illustrations ever since. She is passionate about helping people pursue their dreams, and makes app art for developers on her website http:// www.gameartguppy.com. raywenderlich.com 4
iOS Animations by Tutorials Table of Contents: Overview Introduction Section I: View Animations 13 19 Chapter 1: Getting Started with View Animations 22 35 Chapter 2: Springs 44 Chapter 3: Transitions Chapter 4: View Animations in Practice 57 69 Chapter 5: Keyframe animations 78 80 99 118 ................................................................................ .......................................... ... .......................................................... ..................................................... ...................... ................................. ................................................. ....................... ................................ ..................................... Chapter 6: Introduction to Auto Layout Chapter 7: Animating Constraints Section III: Layer Animations Section II: Auto Layout ...................................................................... ............. ............ ......................................... Chapter 8: Getting Started with Layer Animations Chapter 9: Animation Keys and Delegates Chapter 10: Groups and Advanced Timing Chapter 11: Layer Springs Chapter 12: Layer Keyframe Animations and Struct Properties Chapter 13: Shapes and Masks Chapter 14: Gradient Animations Chapter 15: Stroke and path animations Chapter 16: Replicating Animations ............................................................ ................................ ............................. ................. .......................... raywenderlich.com 121 142 153 162 174 180 193 201 210 5
iOS Animations by Tutorials Section IV: View Controller Transition Animations .... 227 ................................................ Chapter 17: Presentation Controller & Orientation Animations Chapter 18: UINavigationController Custom Transition Animations Chapter 19: Interactive UINavigationController Transitions ....................................................................... .................................................... Section V: Animations with UIViewPropertyAnimator .......................................... 229 249 263 273 275 290 306 ............................................. Chapter 20: Getting Started with UIViewPropertyAnimator Chapter 21: Intermediate Animations with UIViewPropertyAnimator Chapter 22: Interactive Animations with UIViewPropertyAnimator Chapter 23: UIViewPropertyAnimator View Controller Transitions ............................................. ............................................. Section VI: 3D Animations Chapter 24: Simple 3D Animations Chapter 25: Intermediate 3D animations 323 339 343 353 366 Chapter 26: Particle Emitters 368 Chapter 27: Frame Animations with UIImageView 385 395 .................................................... ......................................... ........................... ................ .................. ...................................... . ............................................................................... Section VII: Further Types of Animations Conclusion raywenderlich.com 6
iOS Animations by Tutorials Table of Contents: Extended Introduction What you need Who this book is for How to use this book What’s in store Source code and forums Book updates License About the cover Section I: View Animations Chapter 1: Getting Started with View Animations Your first animation Animatable properties Animation options Challenges Chapter 2: Springs Spring animations Animating user interactions Challenges Chapter 3: Transitions Example transitions Mixing in transitions Challenges Chapter 4: View Animations in Practice Crossfading animations Cube transitions Fade and bounce transitions Challenges Chapter 5: Keyframe animations Keyframe animations ................................................................................ .................................................................................................................. .......................................................................................................... ......................................................................................................... ................................................................................................................... ................................................................................................... ...................................................................................................................... .................................................................................................................................. .................................................................................................................. .......................................... ........... ............................................................................................................ ...................................................................................................... .............................................................................................................. ........................................................................................................................... .................................................................. .............................................................................................................. .............................................................................................. ........................................................................................................................... ............................................................. ............................................................................................................ ........................................................................................................... ........................................................................................................................... .............................. .................................................................................................... .................................................................................................................. ............................................................................................ ........................................................................................................................... ......................................... ........................................................................................................ 13 14 14 15 15 16 17 17 18 19 22 23 27 29 33 35 36 39 42 44 44 48 52 57 58 61 65 67 69 70 raywenderlich.com 7
iOS Animations by Tutorials Challenges Section II: Auto Layout Chapter 6: Introduction to Auto Layout Auto Layout to the rescue Auto Layout Constraints Finalizing the UI Challenges Chapter 7: Animating Constraints Animating Interface Builder constraints Inspecting and animating constraints Animating by replacing constraints Adding menu content Animating dynamically created views Challenges Section III: Layer Animations Chapter 8: Getting Started with Layer Animations Animatable properties Your first layer animation More elaborate layer animations Debugging basic animations Animations vs. real content Best practices Challenges Chapter 9: Animation Keys and Delegates Introducing animation delegates Key-value coding compliance Animation Keys Challenge Chapter 10: Groups and Advanced Timing CAAnimationGroup Animation easing More timing options ........................................................................................................................... ................................................. ............................... ................................................................................................. .................................................................................................... .................................................................................................................. ........................................................................................................................... ......................................... ....................................................................... ........................................................................... .............................................................................. ...................................................................................................... ........................................................................ ........................................................................................................................ ..................................... ........ ................................................................................................... .............................................................................................. ................................................................................ ......................................................................................... ............................................................................................ ................................................................................................................... ........................................................................................................................ ...................... .................................................................................. ....................................................................................... ................................................................................................................ .......................................................................................................................... ..................... ......................................................................................................... ............................................................................................................. ........................................................................................................ 76 78 80 82 83 95 98 99 100 105 108 112 113 117 118 121 121 124 127 131 134 137 138 142 142 143 146 150 153 153 155 157 raywenderlich.com 8
分享到:
收藏