A Colection of useful playgrounds
This repo contains a collection of useful swift playgrounds.
PropertyWrappers Playground
Contains small example of usage with a multiple swift property wrappers for learning purpouses.
Property wrappers
-
ObservableObjectProtocol more. -
@PublishedClass contrained more. -
@StateShould be private if possible. Holds state for specific view more. -
@StateObjectTo be used together with ObservableObject more. -
@ObservedObjectmore.
Tip It is really important that you use@ObservedObjectonly with views that were passed in from elsewhere. You should not use this property wrapper to create the initial instance of an observable object – that’s what@StateObjectis for. -
@EnvironmentObjectmore -
@BindingConnects a property to a source of truth stored elsewhere more.