Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Commit

Permalink
Only allow panel dragging on navigationBar
Browse files Browse the repository at this point in the history
  • Loading branch information
louisdh committed May 28, 2018
1 parent 561ac3d commit b1d9cc6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions PanelKit/Controller/PanelViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,12 @@ extension PanelViewController: UIGestureRecognizerDelegate {
if gestureRecognizer.numberOfTouches == 0 {
return
}

let navigationBar = panelNavigationController.navigationBar

guard navigationBar.frame.contains(gestureRecognizer.location(ofTouch: 0, in: navigationBar)) else {
return
}

let touch = gestureRecognizer.location(ofTouch: 0, in: superview)

Expand Down

0 comments on commit b1d9cc6

Please sign in to comment.