Cocoa heads,
I'm still learning this platform,
But I'm looking at the ASIHTTPRequest lib, and for asynchronous calls, you set the delegate to get the callbacks (error, response received, etc), but that delegate can be anything (no protocol).
I looked into the implementation of the lib, and all the callback methods are wrapped with respondsToSelector to prevent any runtime errors.
To me, this seems too loosely coupled. Is there a reason for this, and is this best practice?
Is it because there would be too many protocol methods to implement? Or... it's convenient to implement only the delegate methods of your choice? Or...?
I'm still learning this platform,
But I'm looking at the ASIHTTPRequest lib, and for asynchronous calls, you set the delegate to get the callbacks (error, response received, etc), but that delegate can be anything (no protocol).
I looked into the implementation of the lib, and all the callback methods are wrapped with respondsToSelector to prevent any runtime errors.
To me, this seems too loosely coupled. Is there a reason for this, and is this best practice?
Is it because there would be too many protocol methods to implement? Or... it's convenient to implement only the delegate methods of your choice? Or...?