Adding UIGestureRecogniser with a subview

I am trying to make an app, where images are added to a layer (as Subviews). Now I try to move these objects around (UIPanGesture Recogniser). I tried many codes, but these did't work. This is my Code:

@objc func StickerLaden(){

        StickerLayer.subviews.forEach { $0.removeFromSuperview() }

        for i in 0 ..< alleSticker.count{

            let imageView = UIImageView(image: alleSticker[i])

           imageView.frame = CGRect(x: 200, y:200, width: 100, height: 100)
            let tap: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(PostAnImageViewController.panning(gestureRecognizer:)))

            tap.delegate = self

            imageView.contentMode = UIViewContentMode.scaleAspectFit

            imageView.isUserInteractionEnabled = true
            imageView.gestureRecognizers = [tap]
            imageView.isUserInteractionEnabled = true



    @objc func panning(gestureRecognizer: UIGestureRecognizer) {


I just tried the touch gesture to work, if it is printed (doesn't work). Would be nice if someone has a solution.

Thank you in advance.