I am having trouble saving data when my app is terminated.
Currently i have an mutable array of strings that are loaded in a uicollection view when the app loads this array saves and loads fine.
I then have an mutable array of mutable arrays of UIViews.
(FIRST Mutable ARRAY –> Second Mutable Array 1, Second Array 2 etc –> UIView 1, UIView 2 etc)
This is what will not save.
Is it possible to save Mutable arrays of UIViews?
Im not sure if i have worded this in the best way but i hope you understand.
I can post code if needed but i used this tutorial as a basis
http://mobileorchard.com/how-to-make-an-iphone-app-part-6-saving-data/
Any help is appreciated.
If you’re using a custom class, you need to make sure it implements the
NSCodingprotocol in order to save it to disk.To save and load it you need to use
NSKeyedArchiverandNSKeyedUnarchiver.The regular
writeToFile:atomically:andwriteToURL:atomically:methods only allow you to write property list objects. They fail if there are any non-property list objects in the array. Property list objects are:NSArray,NSDictionary,NSString,NSData,NSDate, andNSNumber.