Commit 9ad1b5cc by Daniel Dahan

development: issue-600: proposed fix for obc gesture recognizer not being detected

parent a8a76b8c
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'Material' s.name = 'Material'
s.version = '2.3.10' s.version = '2.3.11'
s.license = 'BSD-3-Clause' s.license = 'BSD-3-Clause'
s.summary = 'Material is an animation and graphics framework that is used to create beautiful applications.' s.summary = 'Material is an animation and graphics framework that is used to create beautiful applications.'
s.homepage = 'http://materialswift.com' s.homepage = 'http://materialswift.com'
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>2.3.10</string> <string>2.3.11</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
......
...@@ -179,8 +179,7 @@ open class NavigationDrawerController: RootController, UIGestureRecognizerDelega ...@@ -179,8 +179,7 @@ open class NavigationDrawerController: RootController, UIGestureRecognizerDelega
the NavigationDrawerController. When the panning gesture has the NavigationDrawerController. When the panning gesture has
ended, if the position is beyond the threshold, ended, if the position is beyond the threshold,
the leftView is opened, if it is below the threshold, the the leftView is opened, if it is below the threshold, the
leftView is closed. The leftViewThreshold is always at half leftView is closed.
the width of the leftView.
*/ */
@IBInspectable public var leftThreshold: CGFloat = 64 @IBInspectable public var leftThreshold: CGFloat = 64
fileprivate var leftViewThreshold: CGFloat = 0 fileprivate var leftViewThreshold: CGFloat = 0
...@@ -190,8 +189,7 @@ open class NavigationDrawerController: RootController, UIGestureRecognizerDelega ...@@ -190,8 +189,7 @@ open class NavigationDrawerController: RootController, UIGestureRecognizerDelega
the NavigationDrawerController. When the panning gesture has the NavigationDrawerController. When the panning gesture has
ended, if the position is beyond the threshold, ended, if the position is beyond the threshold,
the rightView is closed, if it is below the threshold, the the rightView is closed, if it is below the threshold, the
rightView is opened. The rightViewThreshold is always at half rightView is opened.
the width of the rightView.
*/ */
@IBInspectable public var rightThreshold: CGFloat = 64 @IBInspectable public var rightThreshold: CGFloat = 64
fileprivate var rightViewThreshold: CGFloat = 0 fileprivate var rightViewThreshold: CGFloat = 0
...@@ -1084,6 +1082,7 @@ extension NavigationDrawerController { ...@@ -1084,6 +1082,7 @@ extension NavigationDrawerController {
- Parameter touch: The UITouch event. - Parameter touch: The UITouch event.
- Returns: A Boolean of whether to continue the gesture or not. - Returns: A Boolean of whether to continue the gesture or not.
*/ */
@objc
open func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool { open func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool {
if !isRightViewOpened && gestureRecognizer == leftPanGesture && (isLeftViewOpened || isPointContainedWithinLeftThreshold(point: touch.location(in: view))) { if !isRightViewOpened && gestureRecognizer == leftPanGesture && (isLeftViewOpened || isPointContainedWithinLeftThreshold(point: touch.location(in: view))) {
return true return true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment