Ios 将相机滚动照片获取到自定义收藏视图

Ios 将相机滚动照片获取到自定义收藏视图,ios,iphone,objective-c,uicollectionview,uiimagepickercontroller,Ios,Iphone,Objective C,Uicollectionview,Uiimagepickercontroller,我有一个带有单元格的自定义集合视图。这是我的CollectionView代码 - (UICollectionViewCell *)collectionView:(UICollectionView *)cv cellForItemAtIndexPath:(NSIndexPath *)indexPath; { Cell *cell = [cv dequeueReusableCellWithReuseIdentifier:@"MY_CELL" forIndexPath:indexPath];

我有一个带有单元格的自定义集合视图。这是我的CollectionView代码

- (UICollectionViewCell *)collectionView:(UICollectionView *)cv cellForItemAtIndexPath:(NSIndexPath *)indexPath;
{
    Cell *cell = [cv dequeueReusableCellWithReuseIdentifier:@"MY_CELL" forIndexPath:indexPath];

    return cell;
}
我想从这些单元格中的摄影机滚动和显示中获取图像。如何在此单元格中查看相机卷图像?我应该使用数组来存储图像的名称,然后在单元格中显示它们吗?
任何人都可以给我一个带有代码的解决方案。

您可以使用
获取相册和照片/视频资产,了解更多信息和表格视图示例。Alos您可以用
UICollectionView

谢谢

-(void)getAlbum
{
   library = [[ALAssetsLibrary alloc] init];
ALAssetsLibraryGroupsEnumerationResultsBlock listGroupBlock = ^(ALAssetsGroup *group, BOOL *stop) {

        if (group)
       {
            [_albumsArray addObject:group];
        } else {
            [self.tableView performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:NO];
        }
    };

   [library enumerateGroupsWithTypes:ALAssetsGroupAll usingBlock:listGroupBlock failureBlock:failureBlock]
}
-(void)getAssets
{
    ALAssetsGroupEnumerationResultsBlock assetsEnumerationBlock = ^(ALAsset * result, NSUInteger index, BOOL *stop) {

        if (result)
        {

        }
        else
        {
            [self.tableView reloadData];
        }
    };

    [_assetGroup setAssetsFilter:[ALAssetsFilter allAssets]];

    [_assetGroup enumerateAssetsUsingBlock:assetsEnumerationBlock];
}