Adding multiple delegates instead of one is a fairly common task. Suppose we have a protocol and a class:
protocol ObserverProtocol { ... } class BroadcasterClass {
If we try to get ObserverProtocol negotiate the AnyObject protocol, we get another error:
Using ObserverProtocol as a specific type matching the AnyObject protocol is not supported
Is it possible to create a set of weak delegates in Swift 3.0?
source share