The delegation pattern is common in many of Apple’s Cocoa API’s. When using it with Swift you create a class-only protocol that the delegate adopts. What I had not noticed was a subtle change in the way you declare a class-only protocol in Swift 4.

Stack views can save you a lot of time when creating constraints. Unfortunately they are not without problems especially when using multi-line labels. Here is one situation where I think you should skip stack views and create your own constraints.

Swift 4.1 is available with Xcode 9.3 and brings a nice gift. The compiler can now automatically generate the code to make your types Equatable or Hashable. This only applies to structs and enums (not classes) and there are conditions but this can still save you from a lot of boring boilerplate code.

Adding edit actions to table view rows has been possible since iOS 8 but only on the right (trailing) side.
The new style swipe actions added in iOS 11 and used by Apple in Mail and other apps can be on either side and can include images.
Here is all you need to know about adding swipe actions to a table view.