SWIFT REVIEW, DAY THREE
This is the final consolidation day for now, and is the last step before we start building real apps tomorrow. This time we’ll be reviewing access control, typecasting, closures, and more.
Today you have just five topics to review. Once you’ve completed them you can, if you want, go back over the tests from earlier days to improve on your scores.
- Static properties and methods
- Access control
- Polymorphism and typecasting
Optional: once you’ve finished reviewing those, you can go back to the review page and go over the tests related to the topics above.
At this point, you now know enough about Swift that you should be looking to expand your learning material a little. Coming at the same topic from multiple angles will help round out your understanding, while also helping keep you up to date with future changes.
While there are lots of places you can try, I’d like to recommend the podcast I make with Sean Allen. It’s called Swift over Coffee, and we think it’s pretty awesome: it’s always 30 minutes or less, we always cover news and views from the community, and we always try to explain everything in a way that newcomers can follow. You can listen here
Bonus: find the Swifty words!
I’ve made a word search to help you test your knowledge of the most useful terms for Swift developers. You can download it as a PDF here, then use the clues below to figure out what words to look for. If you get stuck, try looking through my Swift glossary.
There are 50 in total, and words can go in all directions – good luck!
- Fixed-size collection of values of any type
- A custom type with cases and associated values
- Makes a method shared across all instances of a class or struct
- How we check for and extract the value inside an optional
- Type that stores data as pairs of keys and values
- Places variables into strings easily
- Loop type commonly used to make infinite loops
- A list of criteria that a type must conform to
- Evaluates multiple conditions in one block of code
- Special method that creates instances of structs and classes
- Functions that accept one or more parameters of a specific type
- Code to handle errors thrown by
- Value passed into a function
- Unwrapping alternative to
- Sends back a value from a function
- A catch-all case for switch blocks
- An anonymous function that you can pass around as data
- A whole number
- Telling Swift the specific type a variable should be
- Question marks after optionals
- Code that is triggered when properties change
- May or may not exist
- Keyword that lets function parameters be modified outside the function
- Access control that restricts a property to being used only inside its type
- Skips the rest of the current loop iteration
- Loop that always executes at least once
- The return type of a function that returns nothing
- How we refer to the current instance of an object
- Struct initializer that assigns values to all properties
- The name for how values used in a closure are stored for later use
- A variable attached to a struct or class
- A type that spans values between two numbers
- Special syntax for final parameter closures
- Type that holds a large floating-point number
- The name for math symbols like + and -
- The ability to treat an object of one type as another type
- Adds extra functionality to a type
- The name for a function that exists inside a struct or class
- Exits a loop immediately
- Keyword for a function that can trigger errors
- Key that lets us replace a method inherited from a superclass
- When one class builds on another
- Reads the length of a string
- Apple's all-in-one code editing environment
- Operator that takes three operands
- Puts off work until later
- Name for a method called before class destruction
- Ordered collection of values stored in a single value
- A class that cannot be inherited from
- Holds either true or false
Need help? Tweet me @twostraws!