Ios 将图像添加到现有collectionview

Ios 将图像添加到现有collectionview,ios,uicollectionview,Ios,Uicollectionview,我有一个StudentRecord的示例应用程序,其中我有一个学生图像的UICollectionview。我想将按钮添加到最后一个单元格,此按钮应将学生的图像添加到最后一个单元格。 下面是我现有的代码,如何修改- -(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {

我有一个StudentRecord的示例应用程序,其中我有一个学生图像的
UICollectionview
。我想将按钮添加到最后一个单元格,此按钮应将学生的图像添加到最后一个单元格。 下面是我现有的代码,如何修改-

-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView
                 cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
    CollectionViewCell *myCell = [collectionView
                                    dequeueReusableCellWithReuseIdentifier:@"MyCell"
                                    forIndexPath:indexPath];

    UIImage *image;
    long row = [indexPath row];

    image = [UIImage imageNamed:studentImages[row]];

    myCell.imageView.image = image;



    return myCell;
}

在按钮Clickevent或last cell DidSelect event上,您可以在现有阵列中添加一个或多个数据,并重新加载您的collectionview以添加一个或多个记录Yes这会很有帮助!!我应该选择按钮Clickevent按钮Clickevent或last cell DidSelect事件您可以在现有阵列中添加一个以上的数据并重新加载您的集合视图,以添加一个以上的记录是的,这会很有帮助!!我应该按按钮点击事件