Skip to content

Commit

Permalink
Refactored closing the menu.
Browse files Browse the repository at this point in the history
  • Loading branch information
dbukowski committed Dec 5, 2018
1 parent 9a77d8a commit dd5af5c
Show file tree
Hide file tree
Showing 20 changed files with 1,959 additions and 1,772 deletions.
10 changes: 5 additions & 5 deletions DBDebugToolkit/Classes/DBDebugToolkit.m
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,10 @@ - (void)showMenu {
}

- (void)closeMenu {
[self menuTableViewControllerDidTapClose:self.menuViewController];
UIViewController *presentingViewController = self.menuViewController.navigationController.presentingViewController;
[presentingViewController dismissViewControllerAnimated:YES completion:^{
self.showsMenu = NO;
}];
}

- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSKeyValueChangeKey,id> *)change context:(void *)context {
Expand Down Expand Up @@ -479,10 +482,7 @@ - (void)debugToolkitTriggered:(id<DBDebugToolkitTrigger>)trigger {
#pragma mark - DBMenuTableViewControllerDelegate

- (void)menuTableViewControllerDidTapClose:(DBMenuTableViewController *)menuTableViewController {
UIViewController *presentingViewController = self.menuViewController.navigationController.presentingViewController;
[presentingViewController dismissViewControllerAnimated:YES completion:^{
self.showsMenu = NO;
}];
[self closeMenu];
}

#pragma mark - DBPerformanceWidgetViewDelegate
Expand Down
50 changes: 16 additions & 34 deletions Example/DBDebugToolkit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@
6003F587195388D20070C39A /* Frameworks */,
6003F588195388D20070C39A /* Resources */,
E3BD1DF086F2E3056D86F0AF /* [CP] Embed Pods Frameworks */,
D920CFCECB09DF2F551ED845 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -331,7 +330,6 @@
6003F5AB195388D20070C39A /* Frameworks */,
6003F5AC195388D20070C39A /* Resources */,
102F47257DE3B8E83925D3AF /* [CP] Embed Pods Frameworks */,
BCC884F097ABBD7D49AC9DAC /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -408,9 +406,14 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-DBDebugToolkit_Tests/Pods-DBDebugToolkit_Tests-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Expecta/Expecta.framework",
"${BUILT_PRODUCTS_DIR}/Specta/Specta.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Expecta.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Specta.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand All @@ -423,13 +426,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-DBDebugToolkit_Example-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
4416244A3E82E7B3DC103F6E /* [CP] Check Pods Manifest.lock */ = {
Expand All @@ -438,43 +444,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-DBDebugToolkit_Tests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
BCC884F097ABBD7D49AC9DAC /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DBDebugToolkit_Tests/Pods-DBDebugToolkit_Tests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
D920CFCECB09DF2F551ED845 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DBDebugToolkit_Example/Pods-DBDebugToolkit_Example-resources.sh\"\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
E3BD1DF086F2E3056D86F0AF /* [CP] Embed Pods Frameworks */ = {
Expand All @@ -483,9 +462,12 @@
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-DBDebugToolkit_Example/Pods-DBDebugToolkit_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/DBDebugToolkit/DBDebugToolkit.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DBDebugToolkit.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down
11 changes: 8 additions & 3 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- DBDebugToolkit (0.4.0)
- DBDebugToolkit (0.5.0)
- Expecta (1.0.5)
- Specta (1.0.5)

Expand All @@ -8,15 +8,20 @@ DEPENDENCIES:
- Expecta
- Specta

SPEC REPOS:
https://github.com/cocoapods/specs.git:
- Expecta
- Specta

EXTERNAL SOURCES:
DBDebugToolkit:
:path: "../"

SPEC CHECKSUMS:
DBDebugToolkit: 8f2b2a4f0a5d0a5279071dd462f5238941ccb32d
DBDebugToolkit: 75612593a738d80843f3e99a7e6aaff6f20ca4aa
Expecta: e1c022fcd33910b6be89c291d2775b3fe27a89fe
Specta: ac94d110b865115fe60ff2c6d7281053c6f8e8a2

PODFILE CHECKSUM: 77767a179ee89a5e5c81345791ab10b3079f89ac

COCOAPODS: 1.2.0
COCOAPODS: 1.5.3
4 changes: 2 additions & 2 deletions Example/Pods/Local Podspecs/DBDebugToolkit.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions Example/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit dd5af5c

Please sign in to comment.