Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report bug : Remove image not working #438

Closed
metawin99 opened this issue Dec 25, 2019 · 4 comments
Closed

Report bug : Remove image not working #438

metawin99 opened this issue Dec 25, 2019 · 4 comments

Comments

@metawin99
Copy link

Describe the bug
removeImage in YPSelectionsGalleryVC nor working

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Gallery'
  2. Click on Pick image.'
  3. delete image
  4. not working

Environment (please complete the following information):

  • Device: [e.g. iPhoneX]
  • OS: [e.g. iOS12.2]
  • Xcode Version [e.g. 11.3]
  • Swift Version [e.g. 5]

Installation Type

  • Cocoapods
  • Manual
@app-arianamini
Copy link

Replace this method in YPSelectionsGalleryVC with:

@objc private func removeButtonDidClick(sender: UIButton) { 
    guard let cell = sender.superview?.superview as? UICollectionViewCell, 
    let indexPath = v.collectionView.indexPath(for: cell) else { 
        return 
    } 

    items.remove(at: indexPath.row) v.collectionView.performBatchUpdates({ 
        v.collectionView.deleteItems(at: [indexPath]) 
    }, completion: { [weak self] _ in 
        guard let `self` = self else { return } 
        if self.items.isEmpty { 
            self.navigationController?.popViewController(animated: true) 
        } 
    }) 
}

@s4cha
Copy link
Member

s4cha commented Jan 9, 2020

@metawin99 thanks for noticing and letting us know :) @app-arianamini Thanks for issuing a fix !

@s4cha s4cha closed this as completed in 44e275b Jan 9, 2020
@s4cha
Copy link
Member

s4cha commented Jan 9, 2020

This has just been fixed on master and will be available later today :)

@s4cha
Copy link
Member

s4cha commented Jan 9, 2020

Kaelzs pushed a commit to iftechio/YPImagePicker that referenced this issue Feb 11, 2020
LucasDang pushed a commit to pukapp/secret-ios-YPImagePicker that referenced this issue Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants