Skip to content

Commit

Permalink
Merge pull request #114 from datwelk/hotfix/restore-scroll-view-delegate
Browse files Browse the repository at this point in the history
Restore original scroll view delegate when updating content VC
  • Loading branch information
scenee committed Jan 28, 2019
2 parents f1b70e0 + 49e868a commit 6e4e9df
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 6e4e9df

Please sign in to comment.