Member-only story
New SwiftUI : Instagram Profile UI
Hello everyone, welcome to a new SwiftUI tutorial. I hope you are all doing well? Today I am going to show you how to use Environment Protocol & LazyVGrid in SwiftUI 4 and Xcode 14.
Let’s get started with opening up Xcode 14. We are going to start by adding in the assets for this project. All Assets are available in the code file at the bottom or use your own. 👍 Let’s open a new SwiftUI file called ImageView. Here we are going to show our images and set a width and height.
We are going to create a new SwiftUI file called TabBarButton. This is going to be where we create the tabview in Instagram where you select posts, reels and tagged.
Awesome now we are done with the setup we can head over to the ContentView to start coding the main ui.
What is an Environment
property wrapper?
The Environment property wrapper to read a value stored in a view’s environment. Indicate the value to read using an EnvironmentValues key path in…