Hello - My name is Karla Vohra. I am very new to Swift programming. I am in the process of taking iOS Foundations and I finished Module 1 - Lesson 10 - Buttons and Module 2 - Lesson 3 - Lists, Navigation View and Navigation. For additional practice, I created a simple app that has a HomeScreen View and CreateAccount View. On the HomeScreen View, I have a button called Create Account and Sign-In. When I click on either one of them, I want the button to take me to the CreateAccount View or the Sign-In Screen.
Below is the GitHub link to my code
I tired a couple of options:
OPTION #1 - Tried using NavigationView and NavigationLink (HomeScreenNavigationView.swift)
I am using Button, NavigationView and NavigationLink. When I click on the button, it does take me to the CreateAccount screen but it keeps the back button and the text from my HomeScreen on the CreateAccount screen. I tired using .navigationBarBackButtonHidden( true ) modifier but it does not seem to be working.
How do I disable the back button and the Text from my HomeScreen on the CreateAccount Screen?
Option 2 - Presented the CreateAccountView on top of the HomeScreen but you can clearly see that I have added one view on top of another…which is not what I want. (HomeScreenToggleView.swift)
All I want is to click on either the Create Account Button or the Sign-In Button and it takes me to either the CreateAccountView or the SignInView.
Using xCode Version 13.4 (13F17a)
Any help would be greatly appreciated.