I don't know if it's possible for me to include code here that's relevant as my project is so large but are there any typical reasons why NSLog
would repeat some warnings and calls to it at occasions where only one call/error is occuring?
As an example, I have a subclass of NSBox
that inits an instance of another class on awakeFromNib
:
- (void) awakeFromNib {
burbControllerInstance = [[BurbController alloc] init];
if (burbControllerInstance) {
NSLog(@"init ok");
}
}
I get NSLog
printing "init ok" twice. I don't see why this subclass would be 'awoken' twice anywhere in my project. This is part of a larger problem where I can't get variables to return anything but nil
from the class I'm creating an instance of. I'm wondering if perhaps the double values are something to do with it.
This post could be helpful, i. e. one comment:
Update: Much more interesting could also be this, where the author mentions that
awakeFromNib
gets called twice. Unfortunately there is no real answer for this particular problem but maybe some basic ideas.Update #2: Another potential solution from stackoverflow.com: View Controller calls awakeFromNib twice.