Skip to content

Commit 57e0c19

Browse files
committed
iOS 14 support
1 parent 5e37b54 commit 57e0c19

File tree

5 files changed

+87
-7
lines changed

5 files changed

+87
-7
lines changed

KMNavigationBarTransition.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = "KMNavigationBarTransition"
4-
s.version = "1.1.6"
4+
s.version = "1.1.8"
55
s.summary = "A drop-in universal library makes transition animations smooth between different navigation bar styles while pushing or popping."
66

77
s.description = <<-DESC

KMNavigationBarTransition.xcodeproj/project.pbxproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@
283283
developmentRegion = English;
284284
hasScannedForEncodings = 0;
285285
knownRegions = (
286+
English,
286287
en,
287288
Base,
288289
);
@@ -418,6 +419,7 @@
418419
ONLY_ACTIVE_ARCH = YES;
419420
SDKROOT = iphoneos;
420421
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
422+
SWIFT_VERSION = 4.0;
421423
TARGETED_DEVICE_FAMILY = "1,2";
422424
};
423425
name = Debug;
@@ -458,6 +460,7 @@
458460
MTL_ENABLE_DEBUG_INFO = NO;
459461
SDKROOT = iphoneos;
460462
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
463+
SWIFT_VERSION = 4.0;
461464
TARGETED_DEVICE_FAMILY = "1,2";
462465
VALIDATE_PRODUCT = YES;
463466
};
@@ -472,7 +475,7 @@
472475
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
473476
PRODUCT_BUNDLE_IDENTIFIER = "com.mo.KMNavigationBarTransition-Example";
474477
PRODUCT_NAME = "$(TARGET_NAME)";
475-
SWIFT_VERSION = 3.0;
478+
SWIFT_VERSION = 4.0;
476479
};
477480
name = Debug;
478481
};
@@ -485,7 +488,7 @@
485488
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
486489
PRODUCT_BUNDLE_IDENTIFIER = "com.mo.KMNavigationBarTransition-Example";
487490
PRODUCT_NAME = "$(TARGET_NAME)";
488-
SWIFT_VERSION = 3.0;
491+
SWIFT_VERSION = 4.0;
489492
};
490493
name = Release;
491494
};
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1200"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "CDA3726E1C3907CE00E39A6D"
18+
BuildableName = "KMNavigationBarTransition-Example.app"
19+
BlueprintName = "KMNavigationBarTransition-Example"
20+
ReferencedContainer = "container:KMNavigationBarTransition.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
<BuildableProductRunnable
44+
runnableDebuggingMode = "0">
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "CDA3726E1C3907CE00E39A6D"
48+
BuildableName = "KMNavigationBarTransition-Example.app"
49+
BlueprintName = "KMNavigationBarTransition-Example"
50+
ReferencedContainer = "container:KMNavigationBarTransition.xcodeproj">
51+
</BuildableReference>
52+
</BuildableProductRunnable>
53+
</LaunchAction>
54+
<ProfileAction
55+
buildConfiguration = "Release"
56+
shouldUseLaunchSchemeArgsEnv = "YES"
57+
savedToolIdentifier = ""
58+
useCustomWorkingDirectory = "NO"
59+
debugDocumentVersioning = "YES">
60+
<BuildableProductRunnable
61+
runnableDebuggingMode = "0">
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "CDA3726E1C3907CE00E39A6D"
65+
BuildableName = "KMNavigationBarTransition-Example.app"
66+
BlueprintName = "KMNavigationBarTransition-Example"
67+
ReferencedContainer = "container:KMNavigationBarTransition.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
</ProfileAction>
71+
<AnalyzeAction
72+
buildConfiguration = "Debug">
73+
</AnalyzeAction>
74+
<ArchiveAction
75+
buildConfiguration = "Release"
76+
revealArchiveInOrganizer = "YES">
77+
</ArchiveAction>
78+
</Scheme>

KMNavigationBarTransition.xcodeproj/xcshareddata/xcschemes/KMNavigationBarTransition.xcscheme

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
shouldUseLaunchSchemeArgsEnv = "YES">
3030
<Testables>
3131
</Testables>
32-
<AdditionalOptions>
33-
</AdditionalOptions>
3432
</TestAction>
3533
<LaunchAction
3634
buildConfiguration = "Debug"
@@ -51,8 +49,6 @@
5149
ReferencedContainer = "container:KMNavigationBarTransition.xcodeproj">
5250
</BuildableReference>
5351
</MacroExpansion>
54-
<AdditionalOptions>
55-
</AdditionalOptions>
5652
</LaunchAction>
5753
<ProfileAction
5854
buildConfiguration = "Release"

KMNavigationBarTransition/UIViewController+KMNavigationBarTransition.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ - (void)km_addTransitionNavigationBarIfNeeded {
128128
[self km_adjustScrollViewContentOffsetIfNeeded];
129129
UINavigationBar *bar = [[UINavigationBar alloc] init];
130130
bar.km_isFakeBar = YES;
131+
if (@available(iOS 14, *)) {
132+
bar.items = @[[UINavigationItem new]]; // fix Apple's bug in iOS 14
133+
}
131134
bar.barStyle = self.navigationController.navigationBar.barStyle;
132135
if (bar.translucent != self.navigationController.navigationBar.translucent) {
133136
bar.translucent = self.navigationController.navigationBar.translucent;

0 commit comments

Comments
 (0)