2

我正在使用ALAssert库从 iPhone 库中选择视频,并且我正在设置该视频文件的属性,例如。

 (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] fullScreenImage]] forKey:@"UIImagePickerControllerOriginalImage"];

    [workingDictionary setObject:[[asset valueForProperty:ALAssetPropertyURLs] valueForKey:[[[asset valueForProperty:ALAssetPropertyURLs] allKeys] objectAtIndex:0]] forKey:@"UIImagePickerControllerReferenceURL"];

    [workingDictionary setObject:[[asset defaultRepresentation]url] forKey:@"UIImagePickerControllerMediaURL"];

    [returnArray addObject:workingDictionary];        
    [workingDictionary release];    
}

[self popToRootViewControllerAnimated:NO];
[[self parentViewController] dismissModalViewControllerAnimated:YES];

if([delegate respondsToSelector:@selector(elcImagePickerController:didFinishPickingMediaWithInfo:)]) {
    [delegate performSelector:@selector(elcImagePickerController:didFinishPickingMediaWithInfo:) withObject:self withObject:[NSArray arrayWithArray:returnArray]];
}

}

我在这里设置,但我认为这不是我所做的所有UIImagePickerControllerMediaURL设置的权利。UIImagePickerControllerMediaURL

我如何UIImagePickerControllerMediaURL为选定的视频提供属性。并将该视频转换MediaURL为数据类型。

4

0 回答 0