Skip to content

Commit

Permalink
Updated tint logic for iOS 15.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanvorobei committed Sep 27, 2021
1 parent 3c8de42 commit 82549b1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 23 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -54,46 +54,33 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/(null)">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F43F8319265791A0001D9B3D"
BuildableName = "watchOS Example.app"
BlueprintName = "watchOS Example"
ReferencedContainer = "container:SparrowKit.xcodeproj">
</BuildableReference>
</RemoteRunnable>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/(null)">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F43F8319265791A0001D9B3D"
BuildableName = "watchOS Example.app"
BlueprintName = "watchOS Example"
ReferencedContainer = "container:SparrowKit.xcodeproj">
</BuildableReference>
</RemoteRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F43F8319265791A0001D9B3D"
BuildableName = "watchOS Example.app"
BlueprintName = "watchOS Example"
ReferencedContainer = "container:SparrowKit.xcodeproj">
</BuildableReference>
</MacroExpansion>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
Expand Down
10 changes: 7 additions & 3 deletions Sources/SparrowKit/UIKit/Extensions/UIColorExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,13 @@ extension UIColor {
@available(tvOSApplicationExtension, unavailable)
public static var tint: UIColor {
get {
let value = UIApplication.shared.windows.first?.tintColor
guard let tint = value else { return .systemBlue }
return tint
if #available(iOS 15.0, *) {
return UIColor.tintColor
} else {
let value = UIApplication.shared.windows.first?.tintColor
guard let tint = value else { return .systemBlue }
return tint
}
}
set {
UIApplication.shared.windows.forEach({ $0.tintColor = newValue })
Expand Down
2 changes: 1 addition & 1 deletion SparrowKit.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = 'SparrowKit'
s.version = '3.2.6'
s.version = '3.2.7'
s.summary = 'Collection of native Swift extensions to boost your development. Support tvOS and watchOS.'
s.homepage = 'https://github.com/ivanvorobei/SparrowKit'
s.source = { :git => 'https://github.com/ivanvorobei/SparrowKit.git', :tag => s.version }
Expand Down

0 comments on commit 82549b1

Please sign in to comment.