iphone - dispatch events to parent views -
I have a View Controller that has a button, when pressed, I have this action:
- (IBAction) addTooltip {if (Self Tollipip == blue) {NSArray * nib = [[NSBundle mainBundle] loadNibNamed: @ "Tooltip" owner: Self-choice: zero]; Self.tooltip = [nib object atxaxx: 0]; Self.tooltip.frame = CGRectMake (20, 190, 260, 200); } [Self.view addSubview: tooltip]; }
I have other 2 buttons in this nib but I want to capture my work in my ViewController. Is this possible? Or what is the best way to do this? Tooltip is a type of tooltip, so there is a class for AI.
In tooltip nibb, you can set your view controller to Nib's owner and view controller Button can wire the action.
Edit:
In the interface builder, you can set the category of "Owner of file" Owner's own ViewController
In order to do this in the custom class, click on "File owner" in the document window (⌘0) in the IB,
Comments
Post a Comment