I’m trying to add a little more to the footer view (in addition to the header view in the example project. Specifically some labels that I can update from the view controller.
This is where I’m running into some problems. If I declare an IBOutlet and update the value of it within the footerView method for instance [myLabelField setText:@“some text”];
It works fine. If I try to update the label from viewDidLoad it’s not working.
Is it just to do with the order of the methods. For instance, is the footerView method being called AFTER viewDidLoad and therefore that’s why it’s not updating?
Also I’ve got what is probably a silly question.
In the footerView method, it’s returning the footerView object which is declared in the view controllers header file.
Why does the code to load the XIB file not require an assignment?
Basically how does this:
//Load the xib file
[[NSBundle mainBundle] loadNibNamed:@“FooterView” owner:self options:nil];
translate as this:
Is it a side effect of the if statement to return a value of footerView? I can’t understand how else footerView is assigned to the result of the NSBundle method.
Thanks to anyone that can shed light on it!