title: Class delegate method is not being called
body: <p>I have roughly following class structure</p>
  
  <pre><code>protocol AppointmentModalDelegate: class {
      func didPressSubmitButton()
  }
  
  class AppointmentModalView: UIView {
  
      weak var delegate: AppointmentModalDelegate?
  
      let doneButton:UIButton = {
          let btn = UIButton()
          return btn
      }()
  
      override init(frame: CGRect) {
          super.init(frame: .zero)
          self.setupViews()
          self.setupConstraints()
      }
  
      func setupViews() {
          self.doneButton.addTarget(self, action: #selector(didPressDoneButton), for: .touchUpInside)
      }
  
      func setupConstraints() {
          // Setup View Constraints
      }
  
      @objc func didPressDoneButton() {
          self.delegate?.didPressSubmitButton()
      }
  
      required init?(coder aDecoder: NSCoder) {
          fatalError("init(coder:) has not been implemented")
      }
  }
  
  class AppointmentModal: AppointmentModalDelegate {
  
      private var rootView:UIView?
      var view:AppointmentModalView?
  
      init() {
          self.setupViews()
          self.setupConstraints()
      }
  
      func setupViews() {
          self.view = AppointmentModalView()
          self.view?.delegate = self
      }
  
      func setupConstraints() {
          // Setup Constraints
      }
  
      func didPressSubmitButton() {
          print("Did Press Submit Buttom From Delegate")
      }
  }
  </code></pre>
  
  <p>As you can see, I have defined the delegate in <code>AppointmentModalView</code> and tried to implement it in <code>AppointmentModal</code>, I have also defined the delegate value to self, however the <code>didPressSubmitButton</code> does not gets triggered in <code>AppointmentModal</code> class, what am I missing here?</p>
  
  <p><strong>UPDATE1:</strong></p>
  
  <p>This is basically the modal box I am calling it in UIViewController, roughly here is the code I am using it in UIViewController</p>
  
  <pre><code>class AppointmentFormVC: UIViewController {
  
      @IBOutlet weak var submitButton: UIButton!
  
      override func viewDidLoad() {
          super.viewDidLoad()
          self.submitButton.addTarget(self, action: #selector(didPressSubmitButton), for: .touchUpInside)
      }
  
      @objc func didPressSubmitButton() {
          let appointmentModal = AppointmentModal()
          appointmentModal.show()
      }
  }
  </code></pre>
  
  <p>Thank you.</p>