Explorar o código

ActionSheet: Fix reset of height after dismissal

(closes #438)
Soomin Lee %!s(int64=6) %!d(string=hai) anos
pai
achega
c98c5dbf8e
Modificáronse 1 ficheiros con 4 adicións e 7 borrados
  1. 4 7
      Sources/ActionSheet/ActionSheet.swift

+ 4 - 7
Sources/ActionSheet/ActionSheet.swift

@@ -285,13 +285,10 @@ extension ActionSheet {
                         mainStackView.frame.origin.y += mainStackView.frame.size.height
                         backgroundView.alpha = 0
             }, completion: {
-                [presentingViewController] finished in
-                presentingViewController?.dismiss(animated: false,
-                                                  completion: {
-                                                    [unowned self] in
-                                                    // When everything is complete, reset the frame for the re-use
-                                                    self.mainStackView.frame = realMainStackView
-                })
+                [unowned self, presentingViewController] finished in
+                // When everything is complete, reset the frame for the re-use
+                self.mainStackView.frame = realMainStackView
+                presentingViewController?.dismiss(animated: false, completion: nil)
         })
     }
 }