So far I have programmed most of the programs in the code, but it is very difficult to position the buttons in the code. I searched for a while, maybe I'm using the wrong words for my search? Anyway, I created the user interface in the nib file, it has several buttons. I loaded the .nib file into my view as follows:
NSArray* nibViews = [[NSBundle mainBundle] loadNibNamed:@"UCMenuView" owner:self options:nil];
UIView *menuView = [nibViews objectAtIndex:0];
self.delegate = (id<UCMapviewDelegate>)delegate;
[self.delegate pushView:menuView];
It is perfectly". But I do not understand how I get a pointer to my buttons. I know about IBOutlet, but how to connect them to elements in .nib? How to connect this @property (strong, nonatomic) IBOutlet UIButton *calendar;
to a specific button in .nib?
I tried ctrl-drag (from these small dots on the left side of @property, but this does not work (on either side). Sorry if this is a simple question, but I could not find a clear explanation
thanks for the help
source
share