Commit 6872b35d by Daniel Dahan

removed animating flag

parent 1b93a1a9
...@@ -107,9 +107,6 @@ public protocol SideNavigationViewControllerDelegate { ...@@ -107,9 +107,6 @@ public protocol SideNavigationViewControllerDelegate {
@objc(SideNavigationViewController) @objc(SideNavigationViewController)
public class SideNavigationViewController: UIViewController, UIGestureRecognizerDelegate { public class SideNavigationViewController: UIViewController, UIGestureRecognizerDelegate {
private var animating: Bool = false
/** /**
A CGFloat property that is used internally to track A CGFloat property that is used internally to track
the original (x) position of the container view when panning. the original (x) position of the container view when panning.
...@@ -376,7 +373,6 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer ...@@ -376,7 +373,6 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
} }
if animated { if animated {
animating = true
v.shadowPath = nil v.shadowPath = nil
v.shadowPathAutoSizeEnabled = false v.shadowPathAutoSizeEnabled = false
...@@ -388,7 +384,6 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer ...@@ -388,7 +384,6 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
self.mainViewController.view.alpha = 1 self.mainViewController.view.alpha = 1
}) { [unowned self] _ in }) { [unowned self] _ in
v.shadowPathAutoSizeEnabled = true v.shadowPathAutoSizeEnabled = true
self.animating = false
self.layoutSubviews() self.layoutSubviews()
self.hideView(v) self.hideView(v)
} }
...@@ -400,7 +395,6 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer ...@@ -400,7 +395,6 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
self.mainViewController.view.alpha = 0.5 self.mainViewController.view.alpha = 0.5
}) { [unowned self] _ in }) { [unowned self] _ in
v.shadowPathAutoSizeEnabled = true v.shadowPathAutoSizeEnabled = true
self.animating = false
self.layoutSubviews() self.layoutSubviews()
self.showView(v) self.showView(v)
} }
...@@ -445,7 +439,6 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer ...@@ -445,7 +439,6 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
} }
if animated { if animated {
animating = true
v.shadowPath = nil v.shadowPath = nil
v.shadowPathAutoSizeEnabled = false v.shadowPathAutoSizeEnabled = false
...@@ -457,7 +450,6 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer ...@@ -457,7 +450,6 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
self.mainViewController.view.alpha = 1 self.mainViewController.view.alpha = 1
}) { [unowned self] _ in }) { [unowned self] _ in
v.shadowPathAutoSizeEnabled = true v.shadowPathAutoSizeEnabled = true
self.animating = false
self.layoutSubviews() self.layoutSubviews()
self.hideView(v) self.hideView(v)
} }
...@@ -469,7 +461,6 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer ...@@ -469,7 +461,6 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
self.mainViewController.view.alpha = 0.5 self.mainViewController.view.alpha = 0.5
}) { [unowned self] _ in }) { [unowned self] _ in
v.shadowPathAutoSizeEnabled = true v.shadowPathAutoSizeEnabled = true
self.animating = false
self.layoutSubviews() self.layoutSubviews()
self.showView(v) self.showView(v)
} }
...@@ -927,7 +918,6 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer ...@@ -927,7 +918,6 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
/// Layout subviews. /// Layout subviews.
private func layoutSubviews() { private func layoutSubviews() {
if !animating {
toggleStatusBar() toggleStatusBar()
if let v: MaterialView = leftView { if let v: MaterialView = leftView {
...@@ -952,5 +942,4 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer ...@@ -952,5 +942,4 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
} }
} }
} }
}
} }
\ No newline at end of file
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