Hello. I have a ViewController which has a button that when is pressed adds a subview from nib. I have this action:
- (IBAction) addTooltip {
if (self.tooltip == nil) {
NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"Tooltip" owner:self options:nil];
self.tooltip = [nib objectAtIndex:0];
self.tooltip.frame = CGRectMake(20, 190, 260, 200);
}
[self.view addSubview:tooltip];
}
In this nib i have other 2 buttons but i want to catch their actions in my ViewController. Is it possible? Or how's the best approach to do this? The tooltip is of type Tooltip, so a i have a class for it.