diff --git a/Tusker/Screens/Search/SearchTokenSuggestionCollectionViewCell.swift b/Tusker/Screens/Search/SearchTokenSuggestionCollectionViewCell.swift index 9bd94f8421..cc659fe5f7 100644 --- a/Tusker/Screens/Search/SearchTokenSuggestionCollectionViewCell.swift +++ b/Tusker/Screens/Search/SearchTokenSuggestionCollectionViewCell.swift @@ -30,6 +30,8 @@ class SearchTokenSuggestionCollectionViewCell: UICollectionViewCell { label.topAnchor.constraint(equalTo: contentView.topAnchor), label.bottomAnchor.constraint(equalTo: contentView.bottomAnchor) ]) + + addInteraction(UIPointerInteraction(delegate: self)) } required init?(coder: NSCoder) { @@ -40,3 +42,10 @@ class SearchTokenSuggestionCollectionViewCell: UICollectionViewCell { label.text = text } } + +extension SearchTokenSuggestionCollectionViewCell: UIPointerInteractionDelegate { + func pointerInteraction(_ interaction: UIPointerInteraction, styleFor region: UIPointerRegion) -> UIPointerStyle? { + let preview = UITargetedPreview(view: self) + return UIPointerStyle(effect: .lift(preview)) + } +}