title: AddTarget for custom view UIView is not working
body: <p>I have a custom view class as follows</p>
  <pre><code>class AudioPlayerView: UIView {
  @IBOutlet weak var playAudio: UIButton!
  @IBOutlet weak var audioSlider: UISlider!
  @IBOutlet weak var deleteAudio: UIButton!
  @IBOutlet weak var audioURL: UILabel!
  
  override init(frame: CGRect) {
      super.init(frame: frame)
      self.isUserInteractionEnabled = true
      commonInit()
  }
  required init?(coder: NSCoder) {
      super.init(coder: coder)
  }
  func commonInit(){
      let viewFromXIB = Bundle.main.loadNibNamed(&quot;AudioPlayerView&quot;, owner: self, options: nil)![0] as! UIView
      viewFromXIB.frame = self.bounds
      addSubview(viewFromXIB)
  }
  
  }
  </code></pre>
  <p>I am adding the above view programmatically in a scroll view of view controller and setting up targets for buttons as follows</p>
  <pre><code>func addRecorderdAudioPlayerUI(){
      audioRecorderControlUIView.isHidden = true
      let audioPlayerView = AudioPlayerView()
      audioPlayerView.frame = CGRect(x: 0, y: 0, width: 398, height: 50)
      
      audioPlayerView.audioSlider.addTarget(NoteViewController.self, action: #selector(changeAudioTime), for: .valueChanged)
      audioPlayerView.playAudio.addTarget(NoteViewController.self, action: #selector(playPauseAudioBtnCLicked), for: .touchUpInside)
      audioPlayerView.deleteAudio.addTarget(NoteViewController.self, action: #selector(deleteAudioBtnCLicked), for: .touchUpInside)
      audioPlayerView.audioURL.text = recordingsURLsToSave.last
      
      
      audioContainerScrollView.addSubview(audioPlayerView)
      scrollViewContentWidth += audioPlayerView.frame.width
      audioContainerScrollView.contentSize = CGSize(width: scrollViewContentWidth, height: 50)
  }
  </code></pre>
  <p>I am able to add the view but the .touchUpInside targets are not working.</p>