gahntpo / MatchedGeometryExamples

This demo project demonstrates different use cases for matched geometry effect in SwiftUI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Examples for MatchedGeometryEffect

This demo project demonstrates different use cases for matched geometry effect in SwiftUI.

matchedGeometryEffect(id:in:properties:anchor :isSource:)

Important:

  • only use one view with isSource is true (for the same id)
  • does not work with NavigationView (transition to detail) or sheets, popover etc.

Youtube tutorials

This is the sample project that I develope during a mini-series on Youtube. You can learn how to write this code at:

animation of layout changes

example: switch between HStack and VStack depending on device orientation in AdaptiveCatView

Hero animation

in CatCollectionView

Pickers with one selected element

Files:

Pickers with multiple selected elements

in EmojiPicker: multiple items selected with Hero Animation

About

This demo project demonstrates different use cases for matched geometry effect in SwiftUI.


Languages

Language:Swift 100.0%