Skip to content
This repository was archived by the owner on Nov 3, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions PanModal/Animator/PanModalPresentationAnimator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ public class PanModalPresentationAnimator: NSObject {
else { return }

let presentable = panModalLayoutType(from: transitionContext)

// Calls viewWillAppear and viewWillDisappear
fromVC.beginAppearanceTransition(false, animated: true)

// Presents the view in shortForm position, initially
let yPos: CGFloat = presentable?.shortFormYPos ?? 0.0
Expand Down Expand Up @@ -108,9 +105,6 @@ public class PanModalPresentationAnimator: NSObject {
let toVC = transitionContext.viewController(forKey: .to),
let fromVC = transitionContext.viewController(forKey: .from)
else { return }

// Calls viewWillAppear and viewWillDisappear
toVC.beginAppearanceTransition(true, animated: true)

let presentable = panModalLayoutType(from: transitionContext)
let panView: UIView = transitionContext.containerView.panContainerView ?? fromVC.view
Expand Down
4 changes: 4 additions & 0 deletions PanModal/Controller/PanModalPresentationController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ open class PanModalPresentationController: UIPresentationController {
guard let containerView = containerView
else { return }

if self.panContainerView.frame == .zero {
self.adjustPresentedViewFrame()
}

layoutBackgroundView(in: containerView)
layoutPresentedView(in: containerView)
configureScrollViewInsets()
Expand Down