Posts

Showing posts with the label raywenderlich

Ray Wenderlich Course - SwiftUI (Part 6)

So last week wasn't a GREAT one for coding. I did a bit more work on the practising side of things and have got used to Swift UI for several of the features. Back to Laurie's course now. I reckon 3 or 4 more entries! Start Time - 15:56 Scroll Views and Stacks Right first few minutes or so typing out code to catch up on! The scroll view is literally that - being then be able to scroll across the screen horizontally for this example.     ScrollView (. horizontal ) {              HStack {                  ForEach ( Book . demoBooks ) { book in             VStack {                 Text (book. title )             . padding ([. leading , . top , . trailing ])             Image (book. imageName )               ...

Classes and Structs - interim Practice!

So I was all ready to move onto the next course but really feel the need to crack the whole initialiser (which is one of the most difficult words to type by the way!) thing first. It makes more sense to have a little more practice with this! So for the first time since going back to Treehouse, I'm veering away from it - albeit briefly... First stop - the Apple Developer Guidance Structures  and  classes  are general-purpose, flexible constructs that become the building blocks of your program’s code. You define properties and methods to add functionality to your structures and classes using the same syntax you use to define constants, variables, and functions. Straight from the text! All of that makes sense. Pasan also referred to them as 'Objects'. Ah hang on, that's an instance of a construct. Again, from the text, here is what both Structures and Classes can do: Define properties to store values Define methods to provide functionality Define subscripts t...