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
19af788b
Commit
19af788b
authored
Jan 28, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SideNavigationViewController right view toggle working
parent
b5cc6a58
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Sources/SideNavigationViewController.swift
+5
-5
No files found.
Sources/SideNavigationViewController.swift
View file @
19af788b
...
@@ -231,7 +231,7 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
...
@@ -231,7 +231,7 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
is opened.
is opened.
*/
*/
public
var
opened
:
Bool
{
public
var
opened
:
Bool
{
return
leftView
?
.
x
!=
-
leftViewWidth
return
(
nil
!=
leftView
&&
leftView
!.
x
!=
-
leftViewWidth
||
nil
!=
rightView
&&
rightView
!.
x
!=
view
.
bounds
.
width
)
}
}
/**
/**
...
@@ -535,7 +535,7 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
...
@@ -535,7 +535,7 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
delegate
?
.
sideNavigationViewWillOpen
?(
self
)
delegate
?
.
sideNavigationViewWillOpen
?(
self
)
MaterialAnimation
.
animateWithDuration
(
Double
(
0
==
velocity
?
animationDuration
:
fmax
(
0.1
,
fmin
(
1
,
Double
(
v
.
x
/
velocity
)))),
MaterialAnimation
.
animateWithDuration
(
Double
(
0
==
velocity
?
animationDuration
:
fmax
(
0.1
,
fmin
(
1
,
Double
(
v
.
x
/
velocity
)))),
animations
:
{
animations
:
{
v
.
position
=
CGPointMake
(
-
v
.
width
/
2
,
v
.
height
/
2
)
v
.
position
=
CGPointMake
(
self
.
view
.
bounds
.
width
-
v
.
width
/
2
,
v
.
height
/
2
)
})
{
[
unowned
self
]
in
})
{
[
unowned
self
]
in
self
.
userInteractionEnabled
=
false
self
.
userInteractionEnabled
=
false
self
.
showRightViewDepth
()
self
.
showRightViewDepth
()
...
@@ -707,12 +707,12 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
...
@@ -707,12 +707,12 @@ public class SideNavigationViewController: UIViewController, UIGestureRecognizer
private
func
prepareRightView
()
{
private
func
prepareRightView
()
{
if
nil
!=
rightViewController
{
if
nil
!=
rightViewController
{
rightView
=
MaterialView
()
rightView
=
MaterialView
()
rightView
!.
frame
=
CGRectMake
(
view
.
bounds
.
width
,
0
,
rightViewWidth
,
view
.
frame
.
height
)
rightView
!.
frame
=
CGRectMake
(
0
,
0
,
rightViewWidth
,
view
.
frame
.
height
)
rightView
!.
backgroundColor
=
MaterialColor
.
clear
rightView
!.
backgroundColor
=
MaterialColor
.
clear
view
.
addSubview
(
lef
tView
!
)
view
.
addSubview
(
righ
tView
!
)
MaterialAnimation
.
animationDisabled
{
[
unowned
self
]
in
MaterialAnimation
.
animationDisabled
{
[
unowned
self
]
in
self
.
rightView
!.
position
.
x
=
-
self
.
rightViewWidth
/
2
self
.
rightView
!.
position
.
x
=
self
.
view
.
bounds
.
width
+
self
.
rightViewWidth
/
2
self
.
rightView
!.
zPosition
=
1000
self
.
rightView
!.
zPosition
=
1000
}
}
}
}
...
...
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