Skip to content

Instantly share code, notes, and snippets.

@perlguy99
Last active April 9, 2020 18:27
Show Gist options
  • Save perlguy99/2ce4be6c3c0173b42d66555f3ab313b8 to your computer and use it in GitHub Desktop.
Save perlguy99/2ce4be6c3c0173b42d66555f3ab313b8 to your computer and use it in GitHub Desktop.
SwiftUI Master Page

SwiftUI Master Page

My "Master" Page for all things SwiftUI related

(A work in progress) GitHub basic writing and formatting syntax

Documentation

Great Tutorials

Helper Classes/Methods/Snippets, etc.

Great Libraries/CocoaPods, etc.

Other Notes

Communication Patterns between SwiftUI Views

  • From parent to direct child -> use an initializer
  • From parent to distant child -> use @Environment
  • From child to direct parent -> use @Binding and callbacks
  • From child to distant parent -> use PreferenceKey
  • Between children -> lift the state up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment