Did you check if the function is fired when you hover over the cell ?
Instrument the code:
func pointerInteraction(_ interaction: UIPointerInteraction, styleFor region: UIPointerRegion) -> UIPointerStyle? {
var pointerStyle: UIPointerStyle? = nil
print("pointerInteraction view", interaction.view)
if let interactionView = interaction.view {
let targetedPreview = UITargetedPreview(view: interactionView)
pointerStyle = UIPointerStyle(effect: UIPointerEffect.lift(targetedPreview))
}
return pointerStyle
}
Do you get a print ?
What do you get ?
Did you declare conformance to UIPointerInteractionDelegate protocol ?
Did you addInteraction when you create the cells ?
In tableView(…. cellForRowAt …)
you should have something like describe in the link you provided:
customPointerInteraction(on: cell.view, pointerInteractionDelegate: self)