     public func showPopover(sourceView: UIView, sourceRect: CGRect? = nil) {
         let usableViewController = KUIPopOverUsableViewController(popOverUsable: self)
         usableViewController.showPopover(sourceView: sourceView, sourceRect: sourceRect)
-        onDismissHandler = { [weak self] animated in
-            usableViewController.dismiss(animated: animated, completion: nil)
-            self?.onDismissHandler = nil
+        onDismissHandler = { [weak self] (animated, completion) in
+            self?.dismiss(usableViewController: usableViewController, animated: animated, completion: completion)
         }
     }
     
     public func showPopover(barButtonItem: UIBarButtonItem) {
         let usableViewController = KUIPopOverUsableViewController(popOverUsable: self)
         usableViewController.showPopover(barButtonItem: barButtonItem)
-        onDismissHandler = { [weak self] animated in
+        onDismissHandler = { [weak self] (animated, completion) in
+            self?.dismiss(usableViewController: usableViewController, animated: animated, completion: completion)
+        }
+    }
+    
+    public func dismissPopover(animated: Bool, completion: DismissPopoverCompletion? = nil) {
+        onDismissHandler?(animated, completion)
+    }
+    
+    // MARK: - Private
+    private func dismiss(usableViewController: KUIPopOverUsableViewController, animated: Bool, completion: DismissPopoverCompletion? = nil) {
+        if let completion = completion {
+            usableViewController.dismiss(animated: animated, completion: { [weak self] in
+                self?.onDismissHandler = nil
+                completion()
+            })
+        } else {
             usableViewController.dismiss(animated: animated, completion: nil)
-            self?.onDismissHandler = nil
-        }
-    }
-    
-    public func dismissPopover(animated: Bool) {
-        onDismissHandler?(animated)
+            onDismissHandler = nil
+        }
     }
 }
 

import Foundation
import UIKit

fileprivate class KUIPopOverUsableDismissHandlerWrapper {
    typealias DismissHandler = ((Bool) -> Void)
    var closure: DismissHandler?
    
    init(_ closure: DismissHandler?) {

        rootViewController?.present(naviController, animated: true, completion: nil)
    }
    
    public func dismissPopover(animated: Bool, completion: DismissPopoverCompletion? = nil) {
        dismiss(animated: animated, completion: completion)
    }
}

