Swift Talk

A weekly video series on Swift programming.

Subscribers-Only

Subscribers Only

#32 Array, ArraySlice & Collection (Collections #1) 15:16

We show how to make an extension on array available to other collections: first, we implement it for array slices, then we implement it as a protocol extension for all collections.

Subscribers-Only

Subscribers Only

#46 Combined Class and Protocol Requirements 15:59

We look at multiple ways to create variables that have a class type but also conform to a protocol.

  1. Classes
  2. UIKit
  3. Protocols
April 21, 2017

#37 Custom Collections: Building IndexSet 18:52

We take a look at how to implement a custom collection type. As an example, we build a simple IndexSet implementation. In upcoming episodes we'll make this type conform to collection protocols.

#41 Custom Collections: IndexSet as Collection (Collections #6) 16:51

In this final episode of our collection series, we make our custom IndexSet collection type conform to the Collection protocol, implementing a custom index type along the way.

Subscribers-Only

Subscribers Only

#38 Custom Collections: IndexSet as Sequence 14:08

In this episode, we make a custom collection conform to Sequence. This allows us to efficiently iterate over the elements, and we gain all the useful functionality of Sequence.

Subscribers-Only

Subscribers Only

#52 Deleting Code with Swift 4 11:49

We look at how we can delete code we wrote in previous episodes by taking advantage of some of the new features in Swift 4.

#29 Protocols & Class Hierarchies 16:02

We refactor a class hierarchy using a protocol and discuss the differences between both approaches.

#33 Sequence & Iterator (Collections #2) 16:54

We continue to make the collection extension from the last episode more generic: we implement it on the Sequence protocol and discuss infinite sequences in the process.

#35 Sorted Arrays (Collections #3) 16:42

We look at extracting a sorted array type in order to increase code clarity. We'll also make it conform to Collection.