aleclarson / emitter-kit

Type-safe event handling for Swift
MIT License
567 stars 71 forks source link

Notifier: NSObject #39

Open farzadshbfn opened 7 years ago

farzadshbfn commented 7 years ago

I think it's a good idea to make Notifier subclass of NSObject. this way, developers can retain Notifier object with protocol extensions too. (using objc_setAssociatedObject) .

I've described it here: http://stackoverflow.com/questions/38190702/how-to-use-objc-protocol-with-optional-and-extensions-at-the-same-time/42212943#42212943

aleclarson commented 6 years ago

Can you give me a simple use case, with example code? 👍

Note: I'm not asking for implementation code, just how you expect to use the API.