Skip to content

Commit 2bff955

Browse files
committed
feat: ScreenEdgesDeferring support
1 parent 62bf989 commit 2bff955

File tree

4 files changed

+47
-39
lines changed

4 files changed

+47
-39
lines changed

Example/Podfile.lock

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
PODS:
22
- RTInteractivePush (0.1.5)
3-
- RTRootNavigationController/Core (0.6.3)
4-
- RTRootNavigationController/Push (0.6.3):
3+
- RTRootNavigationController/Core (0.6.7)
4+
- RTRootNavigationController/Push (0.6.7):
55
- RTInteractivePush (~> 0.1.5)
66
- RTRootNavigationController/Core
77

88
DEPENDENCIES:
99
- RTRootNavigationController/Push (from `../`)
1010

11+
SPEC REPOS:
12+
https://github.com/cocoapods/specs.git:
13+
- RTInteractivePush
14+
1115
EXTERNAL SOURCES:
1216
RTRootNavigationController:
1317
:path: "../"
1418

1519
SPEC CHECKSUMS:
1620
RTInteractivePush: 8e1505d2e3afa7e93f6ce0d172b035412356d462
17-
RTRootNavigationController: 179b59c8d9b471e6ecfcf8129bf7c2087c1ddfdc
21+
RTRootNavigationController: 142ef61a6c5ded240e9d618d4616bd39004c700b
1822

1923
PODFILE CHECKSUM: 28fd3aa793345965e373f1b57a81b0124896227d
2024

21-
COCOAPODS: 1.1.1
25+
COCOAPODS: 1.5.2

Example/RTRootNavigationController.xcodeproj/project.pbxproj

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@
277277
6003F587195388D20070C39A /* Frameworks */,
278278
6003F588195388D20070C39A /* Resources */,
279279
CAEBA375F1A94A9C3B578C51 /* [CP] Embed Pods Frameworks */,
280-
3A0F2B760B0EEE58F21976EA /* [CP] Copy Pods Resources */,
281280
);
282281
buildRules = (
283282
);
@@ -297,7 +296,6 @@
297296
6003F5AB195388D20070C39A /* Frameworks */,
298297
6003F5AC195388D20070C39A /* Resources */,
299298
790C465CCA0E2E080BC96378 /* [CP] Embed Pods Frameworks */,
300-
8164BD2A334DA7FAC7C618B7 /* [CP] Copy Pods Resources */,
301299
);
302300
buildRules = (
303301
);
@@ -366,34 +364,22 @@
366364
/* End PBXResourcesBuildPhase section */
367365

368366
/* Begin PBXShellScriptBuildPhase section */
369-
3A0F2B760B0EEE58F21976EA /* [CP] Copy Pods Resources */ = {
370-
isa = PBXShellScriptBuildPhase;
371-
buildActionMask = 2147483647;
372-
files = (
373-
);
374-
inputPaths = (
375-
);
376-
name = "[CP] Copy Pods Resources";
377-
outputPaths = (
378-
);
379-
runOnlyForDeploymentPostprocessing = 0;
380-
shellPath = /bin/sh;
381-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RTRootNavigationController_Example/Pods-RTRootNavigationController_Example-resources.sh\"\n";
382-
showEnvVarsInLog = 0;
383-
};
384367
608429C614C9BBE3B2B83B1D /* [CP] Check Pods Manifest.lock */ = {
385368
isa = PBXShellScriptBuildPhase;
386369
buildActionMask = 2147483647;
387370
files = (
388371
);
389372
inputPaths = (
373+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
374+
"${PODS_ROOT}/Manifest.lock",
390375
);
391376
name = "[CP] Check Pods Manifest.lock";
392377
outputPaths = (
378+
"$(DERIVED_FILE_DIR)/Pods-RTRootNavigationController_Example-RTRootNavigationController_Tests-checkManifestLockResult.txt",
393379
);
394380
runOnlyForDeploymentPostprocessing = 0;
395381
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";
382+
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";
397383
showEnvVarsInLog = 0;
398384
};
399385
790C465CCA0E2E080BC96378 /* [CP] Embed Pods Frameworks */ = {
@@ -402,39 +388,34 @@
402388
files = (
403389
);
404390
inputPaths = (
391+
"${SRCROOT}/Pods/Target Support Files/Pods-RTRootNavigationController_Example-RTRootNavigationController_Tests/Pods-RTRootNavigationController_Example-RTRootNavigationController_Tests-frameworks.sh",
392+
"${BUILT_PRODUCTS_DIR}/RTInteractivePush/RTInteractivePush.framework",
393+
"${BUILT_PRODUCTS_DIR}/RTRootNavigationController/RTRootNavigationController.framework",
405394
);
406395
name = "[CP] Embed Pods Frameworks";
407396
outputPaths = (
397+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RTInteractivePush.framework",
398+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RTRootNavigationController.framework",
408399
);
409400
runOnlyForDeploymentPostprocessing = 0;
410401
shellPath = /bin/sh;
411402
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RTRootNavigationController_Example-RTRootNavigationController_Tests/Pods-RTRootNavigationController_Example-RTRootNavigationController_Tests-frameworks.sh\"\n";
412403
showEnvVarsInLog = 0;
413404
};
414-
8164BD2A334DA7FAC7C618B7 /* [CP] Copy Pods Resources */ = {
415-
isa = PBXShellScriptBuildPhase;
416-
buildActionMask = 2147483647;
417-
files = (
418-
);
419-
inputPaths = (
420-
);
421-
name = "[CP] Copy Pods Resources";
422-
outputPaths = (
423-
);
424-
runOnlyForDeploymentPostprocessing = 0;
425-
shellPath = /bin/sh;
426-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RTRootNavigationController_Example-RTRootNavigationController_Tests/Pods-RTRootNavigationController_Example-RTRootNavigationController_Tests-resources.sh\"\n";
427-
showEnvVarsInLog = 0;
428-
};
429405
CAEBA375F1A94A9C3B578C51 /* [CP] Embed Pods Frameworks */ = {
430406
isa = PBXShellScriptBuildPhase;
431407
buildActionMask = 2147483647;
432408
files = (
433409
);
434410
inputPaths = (
411+
"${SRCROOT}/Pods/Target Support Files/Pods-RTRootNavigationController_Example/Pods-RTRootNavigationController_Example-frameworks.sh",
412+
"${BUILT_PRODUCTS_DIR}/RTInteractivePush/RTInteractivePush.framework",
413+
"${BUILT_PRODUCTS_DIR}/RTRootNavigationController/RTRootNavigationController.framework",
435414
);
436415
name = "[CP] Embed Pods Frameworks";
437416
outputPaths = (
417+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RTInteractivePush.framework",
418+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RTRootNavigationController.framework",
438419
);
439420
runOnlyForDeploymentPostprocessing = 0;
440421
shellPath = /bin/sh;
@@ -447,13 +428,16 @@
447428
files = (
448429
);
449430
inputPaths = (
431+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
432+
"${PODS_ROOT}/Manifest.lock",
450433
);
451434
name = "[CP] Check Pods Manifest.lock";
452435
outputPaths = (
436+
"$(DERIVED_FILE_DIR)/Pods-RTRootNavigationController_Example-checkManifestLockResult.txt",
453437
);
454438
runOnlyForDeploymentPostprocessing = 0;
455439
shellPath = /bin/sh;
456-
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";
440+
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";
457441
showEnvVarsInLog = 0;
458442
};
459443
/* End PBXShellScriptBuildPhase section */

RTRootNavigationController.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'RTRootNavigationController'
11-
s.version = '0.6.6'
11+
s.version = '0.6.7'
1212
s.summary = 'Transparently make every view controller has its own navigation bar'
1313
s.description = <<-DESC
1414
More and more apps use custom navigation bar for each different view controller, instead of one common, gloabal navigation bar.

RTRootNavigationController/Classes/RTRootNavigationController.m

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,16 @@ - (UIStatusBarAnimation)preferredStatusBarUpdateAnimation
278278
}
279279

280280
#if __IPHONE_11_0 && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0
281+
- (nullable UIViewController *)childViewControllerForScreenEdgesDeferringSystemGestures
282+
{
283+
return self.contentViewController;
284+
}
285+
286+
- (UIRectEdge)preferredScreenEdgesDeferringSystemGestures
287+
{
288+
return [self.contentViewController preferredScreenEdgesDeferringSystemGestures];
289+
}
290+
281291
- (BOOL)prefersHomeIndicatorAutoHidden
282292
{
283293
return [self.contentViewController prefersHomeIndicatorAutoHidden];
@@ -542,6 +552,16 @@ - (UIStatusBarAnimation)preferredStatusBarUpdateAnimation
542552
}
543553

544554
#if __IPHONE_11_0 && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0
555+
- (nullable UIViewController *)childViewControllerForScreenEdgesDeferringSystemGestures
556+
{
557+
return self.topViewController;
558+
}
559+
560+
- (UIRectEdge)preferredScreenEdgesDeferringSystemGestures
561+
{
562+
return [self.topViewController preferredScreenEdgesDeferringSystemGestures];
563+
}
564+
545565
- (BOOL)prefersHomeIndicatorAutoHidden
546566
{
547567
return [self.topViewController prefersHomeIndicatorAutoHidden];

0 commit comments

Comments
 (0)