Hello, here is the block where arrayController is nil :
{
NSData * data;
NSError * error;
Class klass;
if(_arrayController != nil) // nil !
{
selected = [_arrayController selectedObjects];
arranged = [_arrayController arrangedObjects];
if([selected count] > 0)
{
_currentObject = [selected objectAtIndex:0];
if(_currentObject != nil)
{
data = [_currentObject valueForKey:kVrRoot];
klass = [NSMutableDictionary class];
_vrRoot =
[NSKeyedUnarchiver unarchivedObjectOfClass:klass fromData:data error:&error];
}else
{
_vrRoot = [NSMutableDictionary new];
data = [NSKeyedArchiver archivedDataWithRootObject:_vrRoot requiringSecureCoding:YES error:&error];
}
}
}
}
I use this for years so I don't no what's wrong.
I replaced the NSArrayController from the object library and renamed the @property(strong)IBOutlet NSArrayController * vrArrayController; Now runs awakeFromNib only one time and the controller is nil.