如何在NSDictionary iOS中存储100个iPad CG图像

时间:2012-05-18 12:32:44

标签: iphone objective-c cgimage

我有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"];

0 个答案:

没有答案