Skip to content

Commit 329bc47

Browse files
authored
Merge pull request #6 from airbnb/dfed--ci-swift-4.0-and-4.2
Support both Swift 4.0 and Swift 4.2
2 parents f5ba203 + bda2f6a commit 329bc47

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

.travis.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
language: objective-c
22
osx_image: xcode10
3-
xcode_project: AloeStackView.xcodeproj
4-
xcode_scheme: AloeStackView
5-
xcode_destination: platform=iOS Simulator,OS=9.0,name=iPhone 6s
3+
env:
4+
- SWIFT_VERSION=4.0
5+
- SWIFT_VERSION=4.2
6+
install:
7+
- bundle install
8+
- brew outdated carthage || brew upgrade carthage
69
before_script:
7-
- bundle install
8-
- brew outdated carthage || brew upgrade carthage
10+
- bundle exec pod lib lint --verbose --fail-fast
11+
- carthage build --verbose --no-skip-current
912
script:
10-
- bundle exec pod lib lint --verbose --fail-fast
11-
- carthage build --verbose --no-skip-current
13+
- xcodebuild -project AloeStackView.xcodeproj -scheme AloeStackView -sdk iphonesimulator -destination "platform=iOS Simulator,OS=9.0,name=iPhone 6s" -configuration Debug -PBXBuildsContinueAfterErrors=0 SWIFT_VERSION=$SWIFT_VERSION build test

AloeStackView.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'AloeStackView'
3-
s.version = '1.0.0'
3+
s.version = '1.0.1'
44
s.license = 'Apache License, Version 2.0'
55
s.summary = 'A simple class for laying out a collection of views with a convenient API, while leveraging the power of Auto Layout.'
66
s.homepage = 'https://github.com/airbnb/AloeStackView'

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ A simple class for laying out a collection of views with a convenient API, while
88
[![Platform](https://img.shields.io/cocoapods/p/AloeStackView.svg)](https://cocoapods.org/pods/AloeStackView)
99
[![Build status](https://travis-ci.com/airbnb/AloeStackView.svg?branch=master)](https://travis-ci.com/airbnb/AloeStackView)
1010

11-
#### Supports Swift 4.2
12-
1311
## Introduction
1412

1513
`AloeStackView` is a class that allows a collection of views to be laid out in a vertical list. In a broad sense, it is similar
@@ -72,7 +70,7 @@ increase to a minimum and makes code contributions and debugging painless.
7270

7371
* Deployment target iOS 9.0+
7472
* Xcode 10.0+
75-
* Swift 4.2+
73+
* Swift 4.0+
7674

7775
## Example App
7876

Sources/AloeStackView/Views/SeparatorView.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ internal final class SeparatorView: UIView {
3131
// MARK: Internal
3232

3333
internal override var intrinsicContentSize: CGSize {
34+
#if swift(>=4.2)
3435
return CGSize(width: UIView.noIntrinsicMetric, height: height)
36+
#else
37+
return CGSize(width: UIViewNoIntrinsicMetric, height: height)
38+
#endif
3539
}
3640

3741
internal var color: UIColor {

0 commit comments

Comments
 (0)