Reading List
Swift’s AnyObject from Michael Tsai RSS feed.
Swift’s AnyObject
Jordan Rose: You can also use AnyObject as a constraint on protocols: protocol MyDelegate: AnyObject. Now the implementers are known to have reference semantics, and with T: MyDelegate you can have weak references to T, as before. You can even have weak references to any MyDelegate, allowing swapping between delegates of different types. What you […]