I have a sample app of StudentRecord in which i have a UICollectionview
of student's images. I want to add button to last cell and this button should add student's image to the last cell.
Following is my existing code, how to modify it-
-(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;
}