I have a View (called MyView) in my Layout file. I want to content to be loaded from another XIB file (called FooterView). This works fine, this way:
NSArray *subviewArray = [[NSBundle mainBundle] loadNibNamed:@"FooterView" owner:self options:nil]; UIView *footerView = [subviewArray objectAtIndex:0]; [MyView addSubview:footerView];
But what if I have a button in my FooterView, with the Retoque en el interior linked to a IBAction in my FooterView.m class? At the moment, when I click on the button, I'm receiving this error: selector no reconocido enviado a la instancia
It would be great if I can catch the button click in the FooterView.m class. How can I get this done?
Edit: I now have the following problem: I want to change the view from My FooterView class (which inherits from UIView) like this:
NewView.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self presentModalViewController:distilleryView animated:YES];
Where NewView is a UIViewController. I can't call presentModalViewController from a View. I also tried getting the parentclass from self, but that doesn't work either.
¿Cómo puedo hacer que esto funcione?
preguntado el 02 de febrero de 12 a las 11:02
Have you tried to set the file's owner to
FooterView in xib like this one