A common problem in iOS or Mac applications is how to properly communicate information between classes (or protocols) without allowing tight coupling. In this post we will discuss the options being available and pose a solution for the multiple delegate problem in a way which is architecturally sound.
By default all collection types in Swift, or Objective C for that matter, reference their objects (in case they are objects, not structs) in a strong manner so the objects won’t get deallocated unless the collection itself is deallocated. For most use cases this is just fine, since you don’t want objects to disappear out of the blue after they are added to the collection. However, for some use cases a strong reference may not be what you want.
This post is about the experience I have as an experienced iOS developer moving from Objective C to Swift and the story Apple (and some other overly-enthusiastic iOS developers) don’t tell you.