[swift-users] How to pass a protocol as parameter, without using @objc?

Bruno Macabeus bruno.macabeus at gmail.com
Sun Mar 12 23:38:51 CDT 2017


Hello,

I wrote a gist to list all classes that subscribers a protocol:
https://gist.github.com/brunomacabeusbr/eea343bb9119b96eed3393e41dcda0c9
It work, but, I could not pass a protocol as parameter, then, I need wrote
one function each time I need to list class from different protocol.
I know how to pass a protocol using @obcj
<http://stackoverflow.com/a/27162499/3440266>, but I can't use @obcj,
because my protocols have property.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170313/6f2b88f4/attachment.html>


More information about the swift-users mailing list