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

Zhao Xin owenzx at gmail.com
Tue Mar 14 02:24:42 CDT 2017


Great!

Zhaoxin

On Tue, Mar 14, 2017 at 2:15 PM, Bruno Macabeus via swift-users <
swift-users at swift.org> wrote:

> I found the solution. I need use a closure.
> I updated the gist: https://gist.github.com/brunomacabeusbr/
> eea343bb9119b96eed3393e41dcda0c9
>
> 2017-03-13 1:38 GMT-03:00 Bruno Macabeus <bruno.macabeus at gmail.com>:
>
>> 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.
>>
>
>
> _______________________________________________
> swift-users mailing list
> swift-users at swift.org
> https://lists.swift.org/mailman/listinfo/swift-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170314/d4185d15/attachment.html>


More information about the swift-users mailing list