浏览代码

ActionSheet: Fix reset of height after dismissal

(closes #438)
Soomin Lee 6 年之前
父节点
当前提交
c98c5dbf8e
共有 1 个文件被更改,包括 4 次插入7 次删除
  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)
         })
     }
 }