我有 100 个 iPad 图像,想将它们存储在字典中...如果我将它们存储在我的 NSMutable 字典应用程序中,则会崩溃..
示例代码是:
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"];