I used to create a UI through code. But now I need to use the storyboard. I am confused about how to add event handlers to controls added to the storyboard, and how to dynamically associate data with controls added to the storyboard. Example scenario: A UIView is added to the storyboard and two UITableViews, and a button is added above it. I want to add an event handler to a button and bind data to table views. How should I do it. If I subclass UIView added to the storyboard, I will have access to the controls (button, two types of tables) added on top of the view, or how else should I do it ?. Please, help!
. UIViewController , , , , , . , .
-(IBAction)doSomething:(id)sender{ //code for doing what you want your button to do. }
, , , - , , .h , IBOutlet UIButton * buttonName; . .m.