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,

  • In Identity Inspector (⌘4), set the class to your custom class (Just type in the name),
  • To view declared actions and the outline of your class, in the document window "Owner of the file" On the right (control) click.

  • Comments

    Popular posts from this blog

    sql - dynamically varied number of conditions in the 'where' statement using LINQ -

    asp.net mvc - Dynamically Generated Ajax.BeginForm -

    Debug on symbian -