I just completed day 79 of 100 days of swiftui. Today, I learnt about the TabView and also how to read custom@EnvironmentObject
.
@EnvironmetObject
is a property wrapper that is used to get objects from the environment. What makes it different from the @ObservedObject
is the fact that you don't have to pass objects you need into every view. With @EnvironmentObject
every child view has access to environment objects declared by it's parent.
Top comments (0)