Skip to content

Commit

Permalink
Fix issue #165
Browse files Browse the repository at this point in the history
  • Loading branch information
andreamazz committed Oct 23, 2015
1 parent deceff6 commit ceffb9d
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Source/ScrollingNavigationController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,23 @@ public class ScrollingNavigationController: UINavigationController, UIGestureRec
}

/**
Determines wether the scrollbar should scroll when the content inside the scrollview fits
Determines wether the navbar should scroll when the content inside the scrollview fits
the view's size. Defaults to `false`
*/
public var shouldScrollWhenContentFits = false

/**
Determines if the scrollbar should expand once the application becomes active after entering background
Determines if the navbar should expand once the application becomes active after entering background
Defaults to `true`
*/
*/
public var expandOnActive = true

/**
Determines if the navbar scrolling is enabled.
Defaults to `true`
*/
public var scrollingEnabled = true

/**
The delegate for the scrolling navbar controller
*/
Expand Down Expand Up @@ -78,6 +84,7 @@ public class ScrollingNavigationController: UINavigationController, UIGestureRec

maxDelay = CGFloat(delay)
delayDistance = CGFloat(delay)
scrollingEnabled = true
}

/**
Expand Down Expand Up @@ -149,6 +156,7 @@ public class ScrollingNavigationController: UINavigationController, UIGestureRec
scrollableView = .None
gestureRecognizer = .None
scrollingNavbarDelegate = .None
scrollingEnabled = false

let center = NSNotificationCenter.defaultCenter()
center.removeObserver(self, name: UIApplicationDidBecomeActiveNotification, object: nil)
Expand Down Expand Up @@ -386,7 +394,7 @@ public class ScrollingNavigationController: UINavigationController, UIGestureRec
// MARK: - UIGestureRecognizerDelegate

public func gestureRecognizer(gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWithGestureRecognizer otherGestureRecognizer: UIGestureRecognizer) -> Bool {
return true
return scrollingEnabled
}

}

0 comments on commit ceffb9d

Please sign in to comment.