I have a class called ToolbarView, which is a subclass UIViewand basically creates UIView, which has fading / re-appearing UIToolbaron top. I also have a subclass ToolbarViewcalled DraggableToolbarViewthat allows the user to drag the view around the screen.
I need to create a delegate for ToolbarViewso that it can notify another object / class when the toolbar reappears and disappears. I also need to create a delegate for DraggableToolbarViewso that I can notify another object / class when dragging the view.
I am currently creating a separate delegate for each, but I wonder if there is a better template for this? Maybe implement one delegate for ToolbarViewand list delegate methods from DraggableToolbarViewas optional? Or is there a way to subclass a delegate?
What is the best / cleanest way to do this?
source
share