I have preview on UIMenu with reactions and it doesnt scroll and answer on dedSelectItemAt

67 Views Asked by At

the sample of how it looks

I have preview on UIMenu with reactions and it doesnt scroll and answer on dedSelectItemAt. It should have a horizontal scrolling but it doesnt response on any touch

this is how I show it on my ReactionsViewController

collectionView.delegate = self
collectionView.dataSource = self
collectionView.isScrollEnabled = true
collectionView.isUserInteractionEnabled = true
collectionView.alwaysBounceHorizontal = true
        
let blurEffect = UIBlurEffect(style: UIBlurEffect.Style.dark)
let blurEffectView = UIVisualEffectView(effect: blurEffect)
collectionView.frame = view.bounds
collectionView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
view.addSubview(collectionView)

this is how I implement it on UIMenu

let configuration = UIContextMenuConfiguration(identifier: identifier, previewProvider: {
            let customView = ReactionsViewController()
            customView.preferredContentSize = CGSize(width: 250, height: 30)
            customView.onReaction = { [weak self] reactionType in
                guard let self = self else { return }
                print(reactionType)
                self.dismiss(animated: true)
            }
0

There are 0 best solutions below