                 }
             }
         }
-        
+
         self.presentedController?.present(self.alertController,
                                           animated: animated,
                                           completion: completion)
-        
+
         return self
     }
-    
+
     private var presentedController:UIViewController? {
         if let viewController = UIApplication.shared.keyWindow?.rootViewController {
             //Find the presented view controller
             var presentedController = viewController
-            
+
             while presentedController.presentedViewController != nil &&
                   presentedController.presentedViewController?.isBeingDismissed == false
             {
                 presentedController = presentedController.presentedViewController!
             }
-            
+
             return presentedController
         }
-        
+
         return nil
     }
-    
+
     private var topViewController:UIViewController? {
         var topController = self.presentedController
-        
+
         while topController?.childViewControllers.last != nil {
             topController = topController?.childViewControllers.last!
         }

            popoverController.sourceView = source
            popoverController.sourceRect = source.bounds
        }
        
        return self
    }
    
    deinit {
        //print("deinit")
    }

        if let popoverController = alertController.popoverPresentationController {
            popoverController.barButtonItem = item
        }

        return self
    }

    /// For ActionSheet
    public func setPresenting(source: UIView) -> Self {
        guard UIDevice.current.userInterfaceIdiom == .pad else {
