2015-07-13 137 views
0

我已經實現了ElcimagePicker代碼到我的應用程序來選擇多個圖像。但是當我點擊select_images按鈕,然後它顯示圖像很好,也可以選擇圖像,但我的問題是,它在圖像列表上顯示視頻screenshot。那麼什麼樣的變化爲只顯示圖像沒有視頻做..顯示視頻以及在ELCImagepicker圖像

-(void)viewDidAppear:(BOOL)animated 
{ 
    ELCImagePickerController *elcPicker = [[ELCImagePickerController alloc] initImagePicker]; 

    elcPicker.maximumImagesCount = 10; //Set the maximum number of images to select to 100 
    elcPicker.returnsOriginalImage = YES; //Only return the fullScreenImage, not the fullResolutionImage 
    elcPicker.returnsImage = YES; //Return UIimage if YES. If NO, only return asset location information 
    elcPicker.onOrder = YES; //For multiple image selection, display and return order of selected images 
    elcPicker.mediaTypes = @[(NSString *)kUTTypeImage, (NSString *)kUTTypeMovie]; //Supports image and movie types 

    elcPicker.imagePickerDelegate = self; 

    [self presentViewController:elcPicker animated:YES completion:nil]; 
} 

- (void)displayPickerForGroup:(ALAssetsGroup *)group 
{ 
    ELCAssetTablePicker *tablePicker = [[ELCAssetTablePicker alloc] initWithStyle:UITableViewStylePlain]; 
    tablePicker.singleSelection = YES; 
    tablePicker.immediateReturn = YES; 

    ELCImagePickerController *elcPicker = [[ELCImagePickerController alloc] initWithRootViewController:tablePicker]; 
    elcPicker.maximumImagesCount = 1; 
    elcPicker.imagePickerDelegate = self; 
    elcPicker.returnsOriginalImage = YES; //Only return the fullScreenImage, not the fullResolutionImage 
    elcPicker.returnsImage = YES; //Return UIimage if YES. If NO, only return asset location information 
    elcPicker.onOrder = NO; //For single image selection, do not display and return order of selected images 
    tablePicker.parent = elcPicker; 

// Move me 
    tablePicker.assetGroup = group; 
    [tablePicker.assetGroup setAssetsFilter:[ALAssetsFilter allAssets]]; 

    [self presentViewController:elcPicker animated:YES completion:nil]; 
} 

編輯: -

我有我的回答以上的問題,但這些選擇的圖像顯示在imageview的滾動型在此代碼,但任何人都知道將這些選定圖像顯示到集合視圖的代碼。

回答

2

我看到你的代碼行,上面寫着:

elcPicker.mediaTypes = @[(NSString *)kUTTypeImage, (NSString *)kUTTypeMovie]; //Supports image and movie types 

修改成:

elcPicker.mediaTypes = @[(NSString *)kUTTypeImage]; //Supports image types 

,看看會發生什麼。

+0

yeahh ..謝謝michael..it作品.... –