I'm trying to UnArchive into an NSMutableArray
. This statement gives me an 'Lvalue required as left operand of assignment'
[[[VariableStore sharedInstance] riskValues] = [NSKeyedUnarchiver unarchiveObjectWithFile:[self archivePath]]];
The NSMutableArray
is de开发者_运维百科clared in the VariableStore
singleton. Any ideas, anyone please?
You can't assign values like that, you would need a setter method...
[[VariableStore sharedInstance]setRiskValues:[NSKeyedUnarchiver unarchiveObjectWithFile:[self archivePath]]];
You should use a setter:
[VariableStore sharedInstance].riskValues = [NSKeyedUnarchiver unarchiveObjectWithFile:[self archivePath]];
Or:
[[VariableStore sharedInstance] setRiskValues:[NSKeyedUnarchiver unarchiveObjectWithFile:[self archivePath]]];
精彩评论