var objects: AnyObject? = NSKeyedUnarchiver.unarchiveObjectWithData(data)
How to turn objects into NSMutableArray ? I archived NSMutableArray.
var objects: AnyObject? = NSKeyedUnarchiver.unarchiveObjectWithData(data)
How to turn objects into NSMutableArray ? I archived NSMutableArray.
Just downcast the result to
NSMutableArray
:If the archived object is an (immutable)
NSArray
then you have to create a mutable copy: