Skip to content

Commit 82549b1

Browse files
committed
Updated tint logic for iOS 15.
1 parent 3c8de42 commit 82549b1

File tree

4 files changed

+14
-23
lines changed

4 files changed

+14
-23
lines changed

Example Apps/SparrowKit.xcodeproj/xcshareddata/xcschemes/watchOS Example.xcscheme

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,46 +54,33 @@
5454
debugDocumentVersioning = "YES"
5555
debugServiceExtension = "internal"
5656
allowLocationSimulation = "YES">
57-
<RemoteRunnable
58-
runnableDebuggingMode = "2"
59-
BundleIdentifier = "com.apple.Carousel"
60-
RemotePath = "/(null)">
57+
<BuildableProductRunnable
58+
runnableDebuggingMode = "0">
6159
<BuildableReference
6260
BuildableIdentifier = "primary"
6361
BlueprintIdentifier = "F43F8319265791A0001D9B3D"
6462
BuildableName = "watchOS Example.app"
6563
BlueprintName = "watchOS Example"
6664
ReferencedContainer = "container:SparrowKit.xcodeproj">
6765
</BuildableReference>
68-
</RemoteRunnable>
66+
</BuildableProductRunnable>
6967
</LaunchAction>
7068
<ProfileAction
7169
buildConfiguration = "Release"
7270
shouldUseLaunchSchemeArgsEnv = "YES"
7371
savedToolIdentifier = ""
7472
useCustomWorkingDirectory = "NO"
7573
debugDocumentVersioning = "YES">
76-
<RemoteRunnable
77-
runnableDebuggingMode = "2"
78-
BundleIdentifier = "com.apple.Carousel"
79-
RemotePath = "/(null)">
74+
<BuildableProductRunnable
75+
runnableDebuggingMode = "0">
8076
<BuildableReference
8177
BuildableIdentifier = "primary"
8278
BlueprintIdentifier = "F43F8319265791A0001D9B3D"
8379
BuildableName = "watchOS Example.app"
8480
BlueprintName = "watchOS Example"
8581
ReferencedContainer = "container:SparrowKit.xcodeproj">
8682
</BuildableReference>
87-
</RemoteRunnable>
88-
<MacroExpansion>
89-
<BuildableReference
90-
BuildableIdentifier = "primary"
91-
BlueprintIdentifier = "F43F8319265791A0001D9B3D"
92-
BuildableName = "watchOS Example.app"
93-
BlueprintName = "watchOS Example"
94-
ReferencedContainer = "container:SparrowKit.xcodeproj">
95-
</BuildableReference>
96-
</MacroExpansion>
83+
</BuildableProductRunnable>
9784
</ProfileAction>
9885
<AnalyzeAction
9986
buildConfiguration = "Debug">

Sources/SparrowKit/UIKit/Extensions/UIColorExtension.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,13 @@ extension UIColor {
104104
@available(tvOSApplicationExtension, unavailable)
105105
public static var tint: UIColor {
106106
get {
107-
let value = UIApplication.shared.windows.first?.tintColor
108-
guard let tint = value else { return .systemBlue }
109-
return tint
107+
if #available(iOS 15.0, *) {
108+
return UIColor.tintColor
109+
} else {
110+
let value = UIApplication.shared.windows.first?.tintColor
111+
guard let tint = value else { return .systemBlue }
112+
return tint
113+
}
110114
}
111115
set {
112116
UIApplication.shared.windows.forEach({ $0.tintColor = newValue })

SparrowKit.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 = 'SparrowKit'
4-
s.version = '3.2.6'
4+
s.version = '3.2.7'
55
s.summary = 'Collection of native Swift extensions to boost your development. Support tvOS and watchOS.'
66
s.homepage = 'https://github.com/ivanvorobei/SparrowKit'
77
s.source = { :git => 'https://github.com/ivanvorobei/SparrowKit.git', :tag => s.version }

0 commit comments

Comments
 (0)