Here's some Swift 3 code to help out. Declare the pan gesture variable and a CGPoint variable ...
let panRec = UIPanGestureRecognizer()
var previousPan:CGPoint = CGPoint.zero
In any function (probably didMove), add the target function, set minimum touches and add it to the view.
panRec.addTarget(self, action: #selector(Page.panned(_:)))
panRec.minimumNumberOfTouches = 1
self.view!.addGestureRecognizer(panRec)
Once that's done, the panned function will run whenever panning occurs. So to summarize what's going on, we only want to move a particular node based on the difference between the current touch location and where the touch was the last frame (thats what's stored in the previousPan CGPoint). So the difference is a very small amount, but obviously we want small amounts or otherwise the node to move goes shooting off from its current location.
func panned(_ sender:UIPanGestureRecognizer) {
var touchLocation:CGPoint = sender.location(in: self.view!)
touchLocation = self.convertPoint(fromView: touchLocation)
if (sender.state == .changed) {
//panning is occuring
if ( previousPan != CGPoint.zero) {
//if previousPan has been set, this can run
panXDiff = touchLocation.x - previousPan.x
panYDiff = touchLocation.y - previousPan.y
//replace node below with the name of the sprite you want to move
node.position = CGPoint( x: node.position.x - panXDiff, y: node.position.y + panYDiff )
}
//save the location to previousPan to be used the next frame of panning
previousPan = touchLocation
}
else if (sender.state == .ended ) {
//panning ended, so reset previousPan to 0,0
previousPan = CGPoint.zero
}