Using MVC. I have a button. Button drawing is in view. The button action should be in controller, right? How do I add action to the button? From view, no reference should be kept of controller (for MVC), then how to set action.
Should the button be made public and accessed by controller?
Or, button should be drawn in controller. (not good)
Or, use a delegate (but then every view-controller pair in MVC will have to have a delegate)
Got it. Has to set addTarget:nil. The action will be passed to next responder in chain. In this case view controller.