Reading List

Dealing With Objective-C Protocol Types in Swift from Michael Tsai RSS feed.

Dealing With Objective-C Protocol Types in Swift

Dave Rahardja: There are two ways to refer to this protocol in Swift: using a native Swift type, or using an Objective-C Protocol object reference. let fungibleSwiftProtocol = Fungible.self let fungibleObjCProtocol = NSProtocolFromString("Fungible")! These two types should be the same—after all, they refer to the same protocol—but they are not, as shown when we print […]