Transfer PanGesture to another view
<p>I want to start pan gesture in 1 item. And at the instant the gesture is recognized I create a new item view at the exact same spot and transfer the pan gesture to the new item so the new hovering item moves with the fingers.</p>

<p>How can I do this?</p>

<p>Here is the code so far:</p>

<pre><code>let panGesture = UIPanGestureRecognizer(target: self, action: #selector(useItemPanGesture(_:)))
item.addGestureRecognizer(panGesture)

func useItemPanGesture(panGesture: UIPanGestureRecognizer) {
    let newView = createView()
    newView.addPanGesture(target: self, action: #selector(self.actualPanGesture(panGesture)))
    panGesture.enabled = false
}

func actualPanGesture(panGesture: UIPanGestureRecognizer) {
     //do pan gesture stuff
}
</code></pre>

<p>I have trouble in the transfer of the pan gesture. Line starting with newView.addPangesture.
 <a href="https://i.stack.imgur.com/IJScZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IJScZ.png" alt="enter image description here"></a></p>