Tutorial by Examples

In Swift, protocol extensions cannot have true properties. However, in practice you can use the "associated object" technique. The result is almost exactly like a "real" property. Here is the exact technique for adding an "associated object" to a protocol extension: ...

Page 1 of 1