Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Pod/Classes/PopupCollectonViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ open class PopupCollectionViewController: UIViewController {
self.popupCollectionView.reloadData()
}

func didTapGesture(_ sender: UITapGestureRecognizer) {
@objc func didTapGesture(_ sender: UITapGestureRecognizer) {
self.dismiss(completion: nil)
}
}
Expand Down Expand Up @@ -363,6 +363,14 @@ extension PopupCollectionViewController: UICollectionViewDataSource {
let vc = self.childViewControllers[indexPath.item]
vc.view.removeFromSuperview()
}

public func collectionView(_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
let vc = self.childViewControllers[indexPath.row]
if vc.view.superview != cell {
vc.view.frame = cell.bounds
cell.addSubview(vc.view)
}
}
}

extension PopupCollectionViewController: UICollectionViewDelegateFlowLayout {
Expand Down