Skip to content

Commit 9a91489

Browse files
committed
Added support for tvOS. Updated podspec file for tvOS. Eliminated class KeyboardLayoutConstraint on tvOS. Eliminated class LoadingView on tvOS.
1 parent 19b04d7 commit 9a91489

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

Spring.podspec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ Pod::Spec.new do |s|
88
s.source = { :git => 'https://github.com/MengTo/Spring.git', :tag => s.version.to_s }
99
s.requires_arc = true
1010
s.ios.deployment_target = '8.0'
11+
s.tvos.deployment_target = '11.0'
1112
s.source_files = 'Spring/*.swift'
12-
s.resources = ['Spring/*.xib', 'SpringApp/*.xcassets']
13+
s.ios.resources = ['Spring/*.xib', 'SpringApp/*.xcassets']
14+
s.tvos.resources = ['SpringApp/*.xcassets']
1315
end

Spring/KeyboardLayoutConstraint.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@
2222

2323
import UIKit
2424

25+
#if !os(tvOS)
26+
@available(tvOS, unavailable)
2527
public class KeyboardLayoutConstraint: NSLayoutConstraint {
2628

2729
private var offset : CGFloat = 0
2830
private var keyboardVisibleHeight : CGFloat = 0
2931

32+
@available(tvOS, unavailable)
3033
override public func awakeFromNib() {
3134
super.awakeFromNib()
3235

@@ -104,3 +107,4 @@ public class KeyboardLayoutConstraint: NSLayoutConstraint {
104107
}
105108

106109
}
110+
#endif

Spring/LoadingView.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
import UIKit
2424

25+
#if !os(tvOS)
26+
@available(tvOS, unavailable)
2527
public class LoadingView: UIView {
2628

2729
@IBOutlet public weak var indicatorView: SpringView!
@@ -81,3 +83,4 @@ public extension UIView {
8183
}
8284

8385
}
86+
#endif

0 commit comments

Comments
 (0)