title: Problem with BSimagepicker showing only last image selected in paging scrollview Swift
body: <p>My <code>Bsimagepicker</code> allows me to select 3 images and places them in a paging <code>UIScrollView</code> but the first two images are missing and the last image shows up. I had it working before something changed. so the image picker should select up to 3 images and put the images in a paging scroll view with a page indicator so you can see what image in the gallery you are looking at. Any help would be much appreciated</p>
  
  <p><a href="https://i.stack.imgur.com/abE8t.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/abE8t.jpg" alt="enter image description here"></a><br>
  <a href="https://i.stack.imgur.com/cH8N3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cH8N3.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/UQXz6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UQXz6.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/bEAWr.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bEAWr.jpg" alt="enter image description here"></a></p>
  
  <pre><code>     @objc func uploadImg( sender: UIButton) {
       PhotoArray.removeAll()
       SelectedAssets.removeAll()
       self.fillImg.isHidden = true
       let imagePicker = ImagePickerController()
       imagePicker.settings.selection.max = 3
       imagePicker.settings.theme.selectionStyle = .numbered
       imagePicker.settings.fetch.assets.supportedMediaTypes = [.image]
       imagePicker.settings.selection.unselectOnReachingMax = true
  
       let start = Date()
       self.presentImagePicker(imagePicker, select: { (asset) in
           print("Selected: \(asset)")
       }, deselect: { (asset) in
           print("Deselected: \(asset)")
       }, cancel: { (assets) in
           print("Canceled with selections: \(assets)")
       }, finish: { (assets) in
           for i in 0..&lt;assets.count
           {
               self.SelectedAssets.append(assets[i])
  
           }
  
           self.convertAssetToImages()
  
           print("Finished with selections: \(assets)")
       }, completion: {
           let finish = Date()
           print(finish.timeIntervalSince(start))
  
  
       })
  
       }
  
  func convertAssetToImages() -&gt; Void {
  
         if SelectedAssets.count != 0{
  
  
             for i in 0..&lt;SelectedAssets.count{
  
  
  
                 let manager = PHImageManager.default()
                 let option = PHImageRequestOptions()
                 var thumbnail = UIImage()
                 option.isSynchronous = true
  
  
                 manager.requestImage(for: SelectedAssets[i], targetSize: CGSize(width: 1000, height: 1000), contentMode: .aspectFill, options: option, resultHandler: {(result, info)-&gt;Void in
                     thumbnail = result!
  
                 })
  
  
              let data = thumbnail.jpegData(compressionQuality: 0.7)
              let newImage = UIImage(data: data!)
  
  
              self.PhotoArray.append(newImage! as UIImage)
  
  
              scrollImg.image = PhotoArray[i]
              scrollImg.contentMode = .scaleAspectFill
              let xPosition = scrollView.frame.width * CGFloat(i)
              scrollImg.clipsToBounds = true
              scrollImg.frame = CGRect(x: xPosition, y: 0, width: scrollView.frame.width , height: scrollView.frame.height)
              scrollView.contentSize.width = scrollView.frame.width * CGFloat(PhotoArray.count)
              self.pageC.numberOfPages = PhotoArray.count
              scrollView.addSubview(scrollImg)
                             }
  
  
      }
         }
  </code></pre>