Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Material
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
Material
Commits
6872b35d
Commit
6872b35d
authored
Feb 29, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed animating flag
parent
1b93a1a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
30 deletions
+19
-30
Sources/SideNavigationViewController.swift
+19
-30
No files found.
Sources/SideNavigationViewController.swift
View file @
6872b35d
...
...
@@ -107,9 +107,6 @@ public protocol SideNavigationViewControllerDelegate {
@objc(SideNavigationViewController)
public
class
SideNavigationViewController
:
UIViewController
,
UIGestureRecognizerDelegate
{
private
var
animating
:
Bool
=
false
/**
A CGFloat property that is used internally to track
the original (x) position of the container view when panning.
...
...
@@ -376,7 +373,6 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
}
if
animated
{
animating
=
true
v
.
shadowPath
=
nil
v
.
shadowPathAutoSizeEnabled
=
false
...
...
@@ -388,7 +384,6 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
self
.
mainViewController
.
view
.
alpha
=
1
})
{
[
unowned
self
]
_
in
v
.
shadowPathAutoSizeEnabled
=
true
self
.
animating
=
false
self
.
layoutSubviews
()
self
.
hideView
(
v
)
}
...
...
@@ -400,7 +395,6 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
self
.
mainViewController
.
view
.
alpha
=
0.5
})
{
[
unowned
self
]
_
in
v
.
shadowPathAutoSizeEnabled
=
true
self
.
animating
=
false
self
.
layoutSubviews
()
self
.
showView
(
v
)
}
...
...
@@ -445,7 +439,6 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
}
if
animated
{
animating
=
true
v
.
shadowPath
=
nil
v
.
shadowPathAutoSizeEnabled
=
false
...
...
@@ -457,7 +450,6 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
self
.
mainViewController
.
view
.
alpha
=
1
})
{
[
unowned
self
]
_
in
v
.
shadowPathAutoSizeEnabled
=
true
self
.
animating
=
false
self
.
layoutSubviews
()
self
.
hideView
(
v
)
}
...
...
@@ -469,7 +461,6 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
self
.
mainViewController
.
view
.
alpha
=
0.5
})
{
[
unowned
self
]
_
in
v
.
shadowPathAutoSizeEnabled
=
true
self
.
animating
=
false
self
.
layoutSubviews
()
self
.
showView
(
v
)
}
...
...
@@ -927,29 +918,27 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
/// Layout subviews.
private
func
layoutSubviews
()
{
if
!
animating
{
toggleStatusBar
()
toggleStatusBar
()
if
let
v
:
MaterialView
=
leftView
{
v
.
width
=
leftViewWidth
v
.
height
=
view
.
bounds
.
height
leftViewThreshold
=
leftViewWidth
/
2
if
let
vc
:
UIViewController
=
leftViewController
{
vc
.
view
.
frame
.
size
.
width
=
v
.
width
vc
.
view
.
frame
.
size
.
height
=
v
.
height
vc
.
view
.
center
=
CGPointMake
(
v
.
width
/
2
,
v
.
height
/
2
)
}
if
let
v
:
MaterialView
=
leftView
{
v
.
width
=
leftViewWidth
v
.
height
=
view
.
bounds
.
height
leftViewThreshold
=
leftViewWidth
/
2
if
let
vc
:
UIViewController
=
leftViewController
{
vc
.
view
.
frame
.
size
.
width
=
v
.
width
vc
.
view
.
frame
.
size
.
height
=
v
.
height
vc
.
view
.
center
=
CGPointMake
(
v
.
width
/
2
,
v
.
height
/
2
)
}
if
let
v
:
MaterialView
=
rightView
{
v
.
width
=
rightViewWidth
v
.
height
=
view
.
bounds
.
height
rightViewThreshold
=
view
.
bounds
.
width
-
rightViewWidth
/
2
if
let
vc
:
UIViewController
=
rightViewController
{
vc
.
view
.
frame
.
size
.
width
=
v
.
width
vc
.
view
.
frame
.
size
.
height
=
v
.
height
vc
.
view
.
center
=
CGPointMake
(
v
.
width
/
2
,
v
.
height
/
2
)
}
}
if
let
v
:
MaterialView
=
rightView
{
v
.
width
=
rightViewWidth
v
.
height
=
view
.
bounds
.
height
rightViewThreshold
=
view
.
bounds
.
width
-
rightViewWidth
/
2
if
let
vc
:
UIViewController
=
rightViewController
{
vc
.
view
.
frame
.
size
.
width
=
v
.
width
vc
.
view
.
frame
.
size
.
height
=
v
.
height
vc
.
view
.
center
=
CGPointMake
(
v
.
width
/
2
,
v
.
height
/
2
)
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment