我有100张iPad图片,希望将它们存储在字典中...如果我将它们存储在我的NSMutabledictionary应用程序中就会崩溃..
示例代码是:
NSMutableDictionary *workingDictionary = [[NSMutableDictionary alloc] initWithCapacity:[_assets count]];
[workingDictionary setObject:@"JPEG" forKey:@"UIImagePickerControllerMediaType"];
[workingDictionary setObject:[UIImage imageWithCGImage:[[asset defaultRepresentation] fullScreenImage]] forKey:@"UIImagePickerControllerOriginalImage"];
[workingDictionary setObject:[[asset valueForProperty:ALAssetPropertyURLs] valueForKey:[[[asset valueForProperty:ALAssetPropertyURLs] allKeys] objectAtIndex:0]] forKey:@"UIImagePickerControllerReferenceURL"];