Commit 1b93a1a9 by Daniel Dahan

MenuViewController now animates the backdrop layer.

parent 95be1774
......@@ -7,8 +7,6 @@
objects = {
/* 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 */; };
9663F9341C7A744600AF0965 /* SearchListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9663F9331C7A744600AF0965 /* SearchListViewController.swift */; };
9663F9391C7A744600AF0965 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9663F9381C7A744600AF0965 /* Assets.xcassets */; };
......@@ -29,7 +27,6 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
9656262E1C836CAA004ADEF7 /* Material.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
......@@ -37,7 +34,6 @@
/* End PBXCopyFilesBuildPhase 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; };
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>"; };
......@@ -58,7 +54,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9656262D1C836CAA004ADEF7 /* Material.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -68,7 +63,6 @@
9663F9251C7A744500AF0965 = {
isa = PBXGroup;
children = (
9656262C1C836CAA004ADEF7 /* Material.framework */,
9663F9301C7A744600AF0965 /* App */,
9663F92F1C7A744600AF0965 /* Products */,
);
......
......@@ -130,7 +130,9 @@ public class MenuViewController: UIViewController {
public func openMenu(completion: (() -> Void)? = nil) {
if true == userInteractionEnabled {
userInteractionEnabled = false
mainViewController.view.alpha = 0.5
UIView.animateWithDuration(0.25, animations: { [unowned self] in
self.mainViewController.view.alpha = 0.5
})
menuView.open(completion)
}
}
......@@ -142,8 +144,11 @@ public class MenuViewController: UIViewController {
*/
public func closeMenu(completion: (() -> Void)? = nil) {
if false == userInteractionEnabled {
userInteractionEnabled = true
mainViewController.view.alpha = 1
UIView.animateWithDuration(0.25, animations: { [unowned self] in
self.mainViewController.view.alpha = 1
}) { [weak self] _ in
self?.userInteractionEnabled = true
}
menuView.close(completion)
}
}
......
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