Skip to content

Commit

Permalink
Ensure the initial state is hidden in presenting it as a modality (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
scenee authored Jun 13, 2022
1 parent 8909267 commit 1ff3c28
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/Transitioning.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ class ModalPresentTransition: NSObject, UIViewControllerAnimatedTransitioning {
return animator
}

// Ensure the current(initial) state is hidden. Because `fpc.transitionAnimator` can be nil if not.
fpc.move(to: .hidden, animated: false)

fpc.suspendTransitionAnimator(true)
fpc.show(animated: true) { [weak fpc] in
fpc?.suspendTransitionAnimator(false)
Expand Down

0 comments on commit 1ff3c28

Please sign in to comment.