-1
我嘗試使用UIImages對數組進行編碼。編碼圖像數組異常
然後調用 「保存」 功能
NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingPathComponent:@"SavedUserData"];
[NSKeyedArchiver archiveRootObject: self toFile:filePath];
我得到線異常
[encoder encodeObject:recipePhotoList forKey:@"recipePhotoList"];
//陣列圖像
-[UIImage encodeWithCoder:]: unrecognized selector sent to instance 0x1b1380
2012-03-23 11:59:43.694 fishmarket[261:1a0f] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImage encodeWithCoder:]: unrecognized selector sent to instance 0x1b1380'
在5+的iOS其完美的工作,對4.3我有這個問題。
我想這樣..但是,我的外殼編碼呢?編碼到字節數組? – 2012-03-23 09:31:14