Join Scott Gardner for an in-depth discussion in this video Subscripting, part of Swift 3 Essential Training: Beyond the Basics.
- [Teacher] You're familiar with using subscripts…with strings, arrays, and dictionaries.…Classes, structures, and enumerations can also…define subscripts as a shorthand syntax…to access elements in sequence or collection properties.…I'm starting out with a couple structures.…First as a coordinate three D structure…that defines x, y, and z values to make…up a point in three D space.…I'm going to use coordinate three D instances…as dictionary keys so it will need to confirm to hashable,…which I've done by defining a hash value computed property…and by implementing the is equal to operator.…
I've also defined a matrix three D structure…that has number of rows, columns, and layers properties.…And it holds a collection of coordinate three D instances…where the coordinate three D is the key…and the value will be a string label.…To ensure that new coordinate three D instances…added to a matrix three D instance are within…the matrixes bounds, that is within the number…of rows, columns, and layers,…I've also defined an is valid coordinate method.…
- Adding source files, resources, links, and literals
- Adding pages to a playground
- Using overflow operators and bitwise operators
- Using ranges with strings
- Creating complex sequences
- Chaining higher-order functions
- Defining lazy properties
- Using failable initializers
- Mutating methods
- Working with singletons
- Nesting function types
- Creating error types and recursive enumerations
- Extending concrete types
- Referencing selectors and key paths
- Working with protocol-oriented programming
- Defining class-only protocols and optional protocols
- Using option sets, type checking, and casting operators
Skill Level Intermediate
Core Data for iOS and macOS Enterprise Developerswith Jon Bott1h 46m Intermediate
Distributing Your iOS App for Testing with TestFlightwith Ron Buencamino35m 10s Intermediate
iOS App Development: Test-Driven Developmentwith Harrison Ferrone2h 14m Intermediate
3. Strings and Characters
4. Sequences and Collections
5. Control Flow
6. Value and Reference Types
9. Access Control
Understand access control3m 47s
Next steps1m 2s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.