iphone Programming Glossary: savedgames
iPhone - archiving array of custom objects http://stackoverflow.com/questions/2814316/iphone-archiving-array-of-custom-objects Chess Games so I'm trying to write an array to a file. This is what the array is if it makes sense NSMutableArray savedGames GameSave a NSMutableArray board Piece a b c etc. some ints NSString whitePlayer blackPlayer int playerOnTop turn GameSave.. ChessSaverAppDelegate UIApplication sharedApplication delegate delegate gameSave setBoard board NSMutableArray savedGames NSKeyedUnarchiver unarchiveObjectWithFile self dataFilePath if savedGames nil NSKeyedArchiver archiveRootObject delegate.. gameSave setBoard board NSMutableArray savedGames NSKeyedUnarchiver unarchiveObjectWithFile self dataFilePath if savedGames nil NSKeyedArchiver archiveRootObject delegate gameSave toFile self dataFilePath else savedGames addObject delegate gameSave..
|