Nick Walter Swift 5 Course - Part 2 (lectures 16 to 22)
Yeah! Two days in a row! Plus, I've managed to get in my summary entry of my first proper year of coding! So today, the plan is to get the 'intermediate' level of Nick's course done. Just 20 minutes now then more soon after that! Start Time - 14:35 Tuples and Sets A point about UIKit - this is a bunch of code that Apple has created. It means you basically have access to all of that code etc. Tuples and Sets hold types. Tuples - a value that holds two or more pieces of information. var dog = ( "Fido" , 8 ) dog . 0 var cat = (name: "Bob" , age: 7 ) I've done the second bit myself as I know you can put in named parameters, rather than just using the raw data to access e.g. using .0 or .1. Ok for sets, if you specify set, like this... var numbers: Set = [ 4 , 7 , 4 , 8 , 4 , 12 , 5 ] OK! That makes sense syntactically. In the above, the 4 and 5 are only shown once each. You can use the .insert method to add...