Advanced iOS Design Patterns, Episode 6: Use Mediator Part 2 | Kodeco, the new raywenderlich.com

Finish using the mediator pattern to complete “Yeti Date”.


This is a companion discussion topic for the original entry at https://www.kodeco.com/1941458-advanced-ios-design-patterns/lessons/6

Not directly related to the content of the video, but I’ve noticed that Joshua wikified self when switching to the main queue after the network call:

DispatchQueue.main.async { [weak self] in 
  guard let self else {
    return
  }
  self.mediator.searchColleague(self, didCreate: set)
}

Was that done on purpose or out of habit? I would’ve not expected a retain cycle here.

1 Like