Open farzadshbfn opened 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) .
Notifier
NSObject
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
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.
I think it's a good idea to make
Notifier
subclass ofNSObject
. this way, developers can retainNotifier
object with protocol extensions too. (usingobjc_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