Delegates
-

Fix: ‘weak cannot be applied to non-class type’ Error for Swift Protocol Delegates
Learn why Swift protocols need AnyObject for weak delegates and how to fix the compile error without using @objc.
-

How to Declare Optional Methods in a Swift Protocol
Swift has no plain optional protocol methods. Learn the two ways to fake them: default implementations in an extension, or @objc optional,…