I'm selecting multiple images from gallery and putting all the selected images in an array. I want to show these images that are in an array in my collection view. I have a collection view in which in a cell I have created an imageView. Now I'm trying to pass my array of images to the image view in the cell. But when I hit done button it only show one image in collection view cell. I have used break points to check my loop the loop is working fine but it is showing only one image. How can I show all the images in an array? My code is this:

```
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
    return 1

}

func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
    let cell = uploadDocCollectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) as! UploadDocsImagesCollectionViewCell

    for i in 0..<imagesArray.count{
        cell.imageView.image = imagesArray[i]
    }

    return cell
}

```