title: UIPanGestureRecognizer doesn't trigger action
body: <p>I'm trying to create a subclass of UIView in order to let expand the view with a pan over it. It should work this way: if the user makes a pan toward the top the view's height decrease, instead if the pan is toward the bottom it should increase. In order to achieve that functionality, I'm trying to add a UIPanGestureRecognizer to the view but it doesn't seem to work. I've done it this way:</p>
  
  <p>The first snippet is the uiView subclass declaration</p>
  
  <pre><code>class ExpandibleView: UIView {
      //Here I create the reference to the recognizer
      let panGestureRecognizer = UIPanGestureRecognizer(target: self, action: #selector(handlePan(_:)))
  
      //And here I set its minimumNumberOfTouches and maximumNumberOfTouches properties and add it to the view
      func initialize() {
          panGestureRecognizer.minimumNumberOfTouches = 1
          panGestureRecognizer.maximumNumberOfTouches = 1
          self.addGestureRecognizer(panGestureRecognizer)
      }
  
      //here's the function that should handle the pan but who instead doesn't seem to been called at all
      @objc func handlePan(_ sender:UIPanGestureRecognizer) {
          //Here's I handle the Pan
      }
  }
  </code></pre>
  
  <p>The second one instead is the implementation inside the View Controller.</p>
  
  <pre><code>class MapViewController: UIViewController {
      @IBOutlet weak var profileView: ExpandibleView!
  
      //MARK: - ViewController Delegate Methods
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          //Here I set the View
          profileView.isUserInteractionEnabled = true
          profileView.initialize()
          profileView.minHeight = 100
          profileView.maxHeight = 190
      }
  
  }
  </code></pre>
  
  <p>I set inside the storyboard the view's class as the subclass I created but the recognizer doesn't trigger at all the handler.</p>