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
1b93a1a9
Commit
1b93a1a9
authored
Feb 29, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MenuViewController now animates the backdrop layer.
parent
95be1774
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
Examples/Programmatic/App/App.xcodeproj/project.pbxproj
+0
-6
Sources/MenuViewController.swift
+8
-3
No files found.
Examples/Programmatic/App/App.xcodeproj/project.pbxproj
View file @
1b93a1a9
...
@@ -7,8 +7,6 @@
...
@@ -7,8 +7,6 @@
objects
=
{
objects
=
{
/* Begin PBXBuildFile section */
/* Begin PBXBuildFile section */
9656262D1C836CAA004ADEF7
/* Material.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9656262C1C836CAA004ADEF7
/* Material.framework */
;
};
9656262E1C836CAA004ADEF7
/* Material.framework in Embed Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9656262C1C836CAA004ADEF7
/* Material.framework */
;
settings
=
{
ATTRIBUTES
=
(
CodeSignOnCopy
,
RemoveHeadersOnCopy
,
);
};
};
9663F9321C7A744600AF0965
/* AppDelegate.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9663F9311C7A744600AF0965
/* AppDelegate.swift */
;
};
9663F9321C7A744600AF0965
/* AppDelegate.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9663F9311C7A744600AF0965
/* AppDelegate.swift */
;
};
9663F9341C7A744600AF0965
/* SearchListViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9663F9331C7A744600AF0965
/* SearchListViewController.swift */
;
};
9663F9341C7A744600AF0965
/* SearchListViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9663F9331C7A744600AF0965
/* SearchListViewController.swift */
;
};
9663F9391C7A744600AF0965
/* Assets.xcassets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9663F9381C7A744600AF0965
/* Assets.xcassets */
;
};
9663F9391C7A744600AF0965
/* Assets.xcassets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9663F9381C7A744600AF0965
/* Assets.xcassets */
;
};
...
@@ -29,7 +27,6 @@
...
@@ -29,7 +27,6 @@
dstPath
=
""
;
dstPath
=
""
;
dstSubfolderSpec
=
10
;
dstSubfolderSpec
=
10
;
files
=
(
files
=
(
9656262E1C836CAA004ADEF7
/* Material.framework in Embed Frameworks */
,
);
);
name
=
"Embed Frameworks"
;
name
=
"Embed Frameworks"
;
runOnlyForDeploymentPostprocessing
=
0
;
runOnlyForDeploymentPostprocessing
=
0
;
...
@@ -37,7 +34,6 @@
...
@@ -37,7 +34,6 @@
/* End PBXCopyFilesBuildPhase section */
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
/* Begin PBXFileReference section */
9656262C1C836CAA004ADEF7
/* Material.framework */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.framework
;
name
=
Material.framework
;
path
=
"/Users/danieldahan/Library/Developer/Xcode/DerivedData/Material-hbpnflxhoouqxebjcyhbbhqyesjd/Build/Products/Debug-iphoneos/Material.framework"
;
sourceTree
=
"<absolute>"
;
};
9663F92E1C7A744600AF0965
/* App.app */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.application
;
includeInIndex
=
0
;
path
=
App.app
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
9663F92E1C7A744600AF0965
/* App.app */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.application
;
includeInIndex
=
0
;
path
=
App.app
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
9663F9311C7A744600AF0965
/* AppDelegate.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AppDelegate.swift
;
sourceTree
=
"<group>"
;
};
9663F9311C7A744600AF0965
/* AppDelegate.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
AppDelegate.swift
;
sourceTree
=
"<group>"
;
};
9663F9331C7A744600AF0965
/* SearchListViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
SearchListViewController.swift
;
sourceTree
=
"<group>"
;
};
9663F9331C7A744600AF0965
/* SearchListViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
SearchListViewController.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -58,7 +54,6 @@
...
@@ -58,7 +54,6 @@
isa
=
PBXFrameworksBuildPhase
;
isa
=
PBXFrameworksBuildPhase
;
buildActionMask
=
2147483647
;
buildActionMask
=
2147483647
;
files
=
(
files
=
(
9656262D1C836CAA004ADEF7
/* Material.framework in Frameworks */
,
);
);
runOnlyForDeploymentPostprocessing
=
0
;
runOnlyForDeploymentPostprocessing
=
0
;
};
};
...
@@ -68,7 +63,6 @@
...
@@ -68,7 +63,6 @@
9663F9251C7A744500AF0965
=
{
9663F9251C7A744500AF0965
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
9656262C1C836CAA004ADEF7
/* Material.framework */
,
9663F9301C7A744600AF0965
/* App */
,
9663F9301C7A744600AF0965
/* App */
,
9663F92F1C7A744600AF0965
/* Products */
,
9663F92F1C7A744600AF0965
/* Products */
,
);
);
...
...
Sources/MenuViewController.swift
View file @
1b93a1a9
...
@@ -130,7 +130,9 @@ public class MenuViewController: UIViewController {
...
@@ -130,7 +130,9 @@ public class MenuViewController: UIViewController {
public
func
openMenu
(
completion
:
(()
->
Void
)?
=
nil
)
{
public
func
openMenu
(
completion
:
(()
->
Void
)?
=
nil
)
{
if
true
==
userInteractionEnabled
{
if
true
==
userInteractionEnabled
{
userInteractionEnabled
=
false
userInteractionEnabled
=
false
mainViewController
.
view
.
alpha
=
0.5
UIView
.
animateWithDuration
(
0.25
,
animations
:
{
[
unowned
self
]
in
self
.
mainViewController
.
view
.
alpha
=
0.5
})
menuView
.
open
(
completion
)
menuView
.
open
(
completion
)
}
}
}
}
...
@@ -142,8 +144,11 @@ public class MenuViewController: UIViewController {
...
@@ -142,8 +144,11 @@ public class MenuViewController: UIViewController {
*/
*/
public
func
closeMenu
(
completion
:
(()
->
Void
)?
=
nil
)
{
public
func
closeMenu
(
completion
:
(()
->
Void
)?
=
nil
)
{
if
false
==
userInteractionEnabled
{
if
false
==
userInteractionEnabled
{
userInteractionEnabled
=
true
UIView
.
animateWithDuration
(
0.25
,
animations
:
{
[
unowned
self
]
in
mainViewController
.
view
.
alpha
=
1
self
.
mainViewController
.
view
.
alpha
=
1
})
{
[
weak
self
]
_
in
self
?
.
userInteractionEnabled
=
true
}
menuView
.
close
(
completion
)
menuView
.
close
(
completion
)
}
}
}
}
...
...
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