Skip to content

Commit 9c2852b

Browse files
committed
Fixed bugs for Xcode 13.3.
1 parent 72d2662 commit 9c2852b

File tree

5 files changed

+8
-2
lines changed

5 files changed

+8
-2
lines changed

Sources/SparrowKit/UIKit/Classes/SPButton.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ open class SPButton: UIButton {
7171
imageEdgeInsets.right = 0
7272
titleEdgeInsets.left = 0
7373
} else {
74-
if UIApplication.shared.userInterfaceLayoutDirection == .leftToRight {
74+
let direction = UIView.userInterfaceLayoutDirection(for: semanticContentAttribute)
75+
if direction == .leftToRight {
7576
imageEdgeInsets.right = inset
7677
titleEdgeInsets.left = inset
7778
} else {

Sources/SparrowKit/UIKit/Extensions/UIColorExtension.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ public extension UIColor {
100100
Usually it is global tint color.
101101
*/
102102
#if !os(watchOS)
103+
@available(iOSApplicationExtension, unavailable)
104+
@available(tvOSApplicationExtension, unavailable)
103105
static var tint: UIColor {
104106
get {
105107
let value = UIApplication.shared.windows.first?.tintColor

Sources/SparrowKit/UIKit/Extensions/UIViewControllerExtension.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ extension UIViewController {
8080
SparrowKit: If scene name is same as
8181
*/
8282
@available(iOS 13, tvOS 13, *)
83+
@available(iOSApplicationExtension, unavailable)
84+
@available(tvOSApplicationExtension, unavailable)
8385
open func destruct(scene name: String) {
8486
guard let session = view.window?.windowScene?.session else {
8587
dismissAnimated()
@@ -126,6 +128,7 @@ extension UIViewController {
126128
*/
127129
#if os(iOS)
128130
@available(iOS 14, *)
131+
@available(iOSApplicationExtension, unavailable)
129132
open func closeBarButtonItem(sceneName: String? = nil) -> UIBarButtonItem {
130133
return UIBarButtonItem.init(systemItem: .close, primaryAction: .init(handler: { [weak self] (action) in
131134
guard let self = self else { return }

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.1.1'
4+
s.version = '3.2.0'
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)