Selaa lähdekoodia

ActionSheet: Fix flickering on dismissal

(closes #486)
Soomin Lee 6 vuotta sitten
vanhempi
commit
5598a6f246
1 muutettua tiedostoa jossa 4 lisäystä ja 3 poistoa
  1. 4 3
      Sources/ActionSheet/ActionSheet.swift

+ 4 - 3
Sources/ActionSheet/ActionSheet.swift

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