I have a scenario in which Obj A sends a message to the delegate of Obj B at the click of a button. Obj B takes some action based on a delegate call.
Obj A wants to show something on the screen based on the result of what happened after the delegate message was called.
Say that Obj B maintains a counter, how many times this action has taken place.
So, when Obj A presses the buttons and calls the delegate method, is it a good idea for this delegate method to return a value, in my case, the current counter?
so that Obj A can display the updated counter value.
In this case, the same message acts as a delegate and data source.
For me, Obj A is View and Obj B. This is a view controller.
Is my implementation erroneous?
source share