我有NSMutuableArray
UIImages 。当试图将他救到 时userDefaults
,我收到警告。如果它是一个字符串数组,它的工作正常。
//save to memory
NSMutableArray *savedImages=[[NSMutableArray alloc]init];
for(int j=0;j<[selectedButtonsTags count];j++)
[savedImages addObject:[assets objectAtIndex:[[selectedButtonsTags objectAtIndex:j] intValue]]];
[memoryInstance setTempImagesToSend:savedImages]; //here save to NSUserDefault
[savedImages release];
警告 :
[NSUserDefaults setObject:forKey:]: Attempt to insert non-property value
为什么 userdefault 关心我的数组包含哪些对象?