Skip to content

Commit

Permalink
restore original scroll view delegate when updating content viewcontr…
Browse files Browse the repository at this point in the history
…oller
  • Loading branch information
datwelk committed Jan 26, 2019
1 parent 2c72d07 commit 49e868a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Framework/Sources/FloatingPanelController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,12 @@ public class FloatingPanelController: UIViewController, UIScrollViewDelegate, UI
vc.willMove(toParentViewController: nil)
vc.view.removeFromSuperview()
vc.removeFromParentViewController()

if let scrollView = floatingPanel.scrollView,
let delegate = floatingPanel.userScrollViewDelegate,
vc.view.subviews.contains(scrollView) {
scrollView.delegate = delegate
}
}

if let vc = contentViewController {
Expand Down

0 comments on commit 49e868a

Please sign in to comment.