Skip to content

Commit 1820aa1

Browse files
committed
move the addChildViewController to call viewWillAppear with the side set
1 parent 585d75c commit 1820aa1

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

DGSideNavigation.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@
393393
);
394394
runOnlyForDeploymentPostprocessing = 0;
395395
shellPath = /bin/sh;
396-
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";
396+
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";
397397
showEnvVarsInLog = 0;
398398
};
399399
25B3B749DF62C8D4C44672BB /* [CP] Copy Pods Resources */ = {
@@ -468,7 +468,7 @@
468468
);
469469
runOnlyForDeploymentPostprocessing = 0;
470470
shellPath = /bin/sh;
471-
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";
471+
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";
472472
showEnvVarsInLog = 0;
473473
};
474474
6BE62C142BE784A263C3A1FA /* [CP] Check Pods Manifest.lock */ = {
@@ -483,7 +483,7 @@
483483
);
484484
runOnlyForDeploymentPostprocessing = 0;
485485
shellPath = /bin/sh;
486-
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";
486+
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";
487487
showEnvVarsInLog = 0;
488488
};
489489
A3169DD81DE0654400BABAFD /* Swiftlint */ = {
@@ -526,7 +526,7 @@
526526
);
527527
runOnlyForDeploymentPostprocessing = 0;
528528
shellPath = /bin/sh;
529-
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";
529+
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";
530530
showEnvVarsInLog = 0;
531531
};
532532
C85ED419C5B5AA8FA5BA8F58 /* [CP] Embed Pods Frameworks */ = {

Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
PODFILE CHECKSUM: 110b615900cee7b87ed92528a2ce50e8b9ac272d
22

3-
COCOAPODS: 1.2.0
3+
COCOAPODS: 1.2.1

Samples/DGSideNavigationSample-iOS/DGSideNavigationSample-iOS.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@
249249
);
250250
runOnlyForDeploymentPostprocessing = 0;
251251
shellPath = /bin/sh;
252-
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";
252+
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";
253253
showEnvVarsInLog = 0;
254254
};
255255
/* End PBXShellScriptBuildPhase section */

Samples/DGSideNavigationSample-tvOS/DGSideNavigationSample-tvOS.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@
244244
);
245245
runOnlyForDeploymentPostprocessing = 0;
246246
shellPath = /bin/sh;
247-
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";
247+
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";
248248
showEnvVarsInLog = 0;
249249
};
250250
/* End PBXShellScriptBuildPhase section */

Sources/SideNavigationController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ open class SideNavigationController: UIViewController {
138138
private func link(viewController: UIViewController, in view: UIView? = nil, at position: Int = -1) {
139139
viewController.view.autoresizingMask = UIViewAutoresizing(rawValue: 0b111111)
140140
let container: UIView = view != nil ? view! : self.view
141+
self.addChildViewController(viewController)
141142
if position < 0 {
142143
container.addSubview(viewController.view)
143144
} else {
144145
container.insertSubview(viewController.view, at: position)
145146
}
146-
self.addChildViewController(viewController)
147147
}
148148

149149
private func unlink(viewController: UIViewController?) {

0 commit comments

Comments
 (0)