You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Luke Zhao edited this page Feb 12, 2017
·
1 revision
Hero creates snapshots of your animating views when performing animations. Use the following four modifiers to change how Hero take these snapshots.
useOptimizedSnapshot
With this modifier, Hero will create snapshot optimized for different view type when animating.
For custom views or views with masking, useOptimizedSnapshot might create snapshots
that appear differently than the actual view.
In that case, use .useNormalSnapshot or .useSlowRenderSnapshot to disable the optimization.
useNormalSnapshot
Create snapshot using snapshotView(afterScreenUpdates:).
useLayerRenderSnapshot
Create snapshot using layer.render(in: currentContext).
This is slower than .useNormalSnapshot but gives more accurate snapshot for some views (eg. UIStackView).
useNoSnapshot
Force Hero to not create any snapshot when animating this view. Hence Hero will animate on the view directly.
This will mess up the view hierarchy. Therefore, view controllers have to rebuild its view structure after the transition finishes.