Swift Protocols Constrained to a Specific Class
Objective-C developers learning Swift often wonder how to represent something like
UIViewController<MyProtocol>
. The simple answer is that there's currently no way to directly represent that construct in Swift as of Swift 2.2. However, it's possible to work around it fairly easily with just a tiny bit of extra code.