Ray Wenderlich Course - SwiftUI (Part 7)
So this may be the last bit for now from Laurie. I've learned a lot from him but it is taking a long, long time to go through the technical stuff. I will finish this chapter, then review what else there is on rw.com. With a Black November, I've signed up for the year! So no pressure in terms of renewing per month. A year should give me enough time and access that I need.
Start Time - 16:58
Navigation View
Yes! These are for navigating views - for going from one to another. Navigation controller used to be used for this.
Back to the same project as last time.
So, again hard stuff! The code has been wrapped in a NavigationView, then there was a bit more code to go with that. A new SwiftFile to have each of the book pictures and titles.
COOL FEATURE!
You can select a certain bit of a code - in this case, the VStack with that whole section. Command click, then go to Extract Subview. From there, you can rename the extracted view what you want, then create a new Swift UI view with that name! That is so good for keeping the code neat and tidy.
Lots more code that I'm not going to type out all of. The key thing here is that you can have smaller components - a few SwiftUI View files that link together and can be combined.
Sheet - this is bringing up a separate page that can be toggled in a certain condition. So in our example, a HelpView SwiftUI file was already created by Laurie with all of the correct properties. The 'Help' text appeared at the top for this.
Tab Views
There are limitations with these - can be text, image or image followed by text.
So this is again, cool! You can basically have a tab bar with different buttons (text and/or image). These then take you to different views!
Finish Time - 17:52 (approx 45 mins with interruptions)
There is a LOT here to play around with. Next entry will be a consolidation one to put all this into practice. Before I do that, I need to choose something definitive - something that I can actually play around with...
I think I will stick with that F1 idea. Yes. What I can do is have an image (resizing will be important...) with key info e.g. name, then other key stats in a separate struct. Then I will use that to display each driver, with the name... THEN I can other screens coming up of their key stats and info when clicked on. The other screens e.g. help, then the tab buttons.... All of that I can add in and gradually make my own F1 driver app!
Very simple and of no real actual use, but perfect just to get used to these features with. Cool!
Start Time - 16:58
Navigation View
Yes! These are for navigating views - for going from one to another. Navigation controller used to be used for this.
Back to the same project as last time.
So, again hard stuff! The code has been wrapped in a NavigationView, then there was a bit more code to go with that. A new SwiftFile to have each of the book pictures and titles.
COOL FEATURE!
You can select a certain bit of a code - in this case, the VStack with that whole section. Command click, then go to Extract Subview. From there, you can rename the extracted view what you want, then create a new Swift UI view with that name! That is so good for keeping the code neat and tidy.
Lots more code that I'm not going to type out all of. The key thing here is that you can have smaller components - a few SwiftUI View files that link together and can be combined.
Sheet - this is bringing up a separate page that can be toggled in a certain condition. So in our example, a HelpView SwiftUI file was already created by Laurie with all of the correct properties. The 'Help' text appeared at the top for this.
Tab Views
There are limitations with these - can be text, image or image followed by text.
So this is again, cool! You can basically have a tab bar with different buttons (text and/or image). These then take you to different views!
Finish Time - 17:52 (approx 45 mins with interruptions)
There is a LOT here to play around with. Next entry will be a consolidation one to put all this into practice. Before I do that, I need to choose something definitive - something that I can actually play around with...
I think I will stick with that F1 idea. Yes. What I can do is have an image (resizing will be important...) with key info e.g. name, then other key stats in a separate struct. Then I will use that to display each driver, with the name... THEN I can other screens coming up of their key stats and info when clicked on. The other screens e.g. help, then the tab buttons.... All of that I can add in and gradually make my own F1 driver app!
Very simple and of no real actual use, but perfect just to get used to these features with. Cool!
Comments
Post a Comment