Permalink
Browse files

Code cleanup

  • Loading branch information...
1 parent 4cda870 commit d5102815c3025d80df73016dc8f43e443731c425 @brutella committed Jan 3, 2013
Showing with 1 addition and 17 deletions.
  1. +1 −17 Classes/ELCImagePickerController.m
View
18 Classes/ELCImagePickerController.m
@@ -23,27 +23,11 @@ -(void)cancelImagePicker {
}
-(void)selectedAssets:(NSArray*)_assets {
-
- NSMutableArray *returnArray = [[[NSMutableArray alloc] init] autorelease];
-
- for(ALAsset *asset in _assets) {
-
- NSMutableDictionary *workingDictionary = [[NSMutableDictionary alloc] init];
- [workingDictionary setObject:[asset valueForProperty:ALAssetPropertyType] forKey:@"UIImagePickerControllerMediaType"];
- [workingDictionary setObject:[UIImage imageWithCGImage:[[asset defaultRepresentation] fullResolutionImage]] forKey:@"UIImagePickerControllerOriginalImage"];
- [workingDictionary setObject:[[asset valueForProperty:ALAssetPropertyURLs] valueForKey:[[[asset valueForProperty:ALAssetPropertyURLs] allKeys] objectAtIndex:0]] forKey:@"UIImagePickerControllerReferenceURL"];
-
- [returnArray addObject:asset];
-// [returnArray addObject:workingDictionary];
-
- [workingDictionary release];
- }
-
[self popToRootViewControllerAnimated:NO];
[[self parentViewController] dismissViewControllerAnimated:YES completion:^{}];
if([delegate respondsToSelector:@selector(elcImagePickerController:didFinishPickingMediaWithInfo:)]) {
- [delegate performSelector:@selector(elcImagePickerController:didFinishPickingMediaWithInfo:) withObject:self withObject:[NSArray arrayWithArray:returnArray]];
+ [delegate performSelector:@selector(elcImagePickerController:didFinishPickingMediaWithInfo:) withObject:self withObject:[NSArray arrayWithArray:_assets]];
}
}

0 comments on commit d510281

Please sign in to comment.