    Sets title and handler for positive button of dialog.
    - Parameter _ title: A string.
    - Parameter handler: A closure handling tap.
-   - Returns: DialogBuilder itself to allow chaining.
+   - Returns: Dialog itself to allow chaining.
    */
   open func positive(_ title: String?, handler: (() -> Void)?) -> Dialog {
     dialogView.positiveButton.title = title
-    controller.didTapPositiveButtonHandler = handler
+    controller.didTapPositiveButtonHandler = { [unowned self] in
+      self.delegate?.dialog?(self, didTapPositive: self.controller.dialogView.positiveButton)
+      handler?()
+    }
     return self
   }
   

  /**
   Sets details of the dialog.
   - Parameter _ text: A string.
   - Returns: DialogBuilder itself to allow chaining.
   */
  open func details(_ text: String?) -> Dialog {
    dialogView.detailsLabel.text = text

    return controller.dialogView
  }
}

/// A memory reference to companion Dialog instance.
private var DialogKey: UInt8 = 0

private extension DialogController {
  /**
   A Dialog instance attached to the dialog controller.
   This is used to keep Dialog alive throughout the lifespan
   of the controller.
   */
  var dialog: Dialog? {
    get {
      return AssociatedObject.get(base: self, key: &DialogKey) {
        return nil
      }
    }
    set(value) {
      AssociatedObject.set(base: self, key: &DialogKey, value: value)
    }
  }
}
