Skip to content

Commit

Permalink
Merge branch 'develop' into release/0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
g-mark committed Jan 28, 2020
2 parents 58efc0f + af2d5ef commit 6d31bf3
Show file tree
Hide file tree
Showing 48 changed files with 1,040 additions and 67 deletions.
20 changes: 19 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
build-and-test-swift51:
<<: *defaults
macos:
xcode: 11.0.0
xcode: 11.3.0
steps:
- checkout
- install_dependencies
Expand All @@ -95,6 +95,21 @@ jobs:
swift: '5.1'
device: 'iPhone 11'

build-and-test-swiftpm:
<<: *defaults
macos:
xcode: 11.3.0
steps:
- checkout
- install_dependencies
- run:
name: "Build example (test spm)"
command: >-
xcodebuild build
-project "WWLayoutExample/WWLayoutTV/WWLayoutTV.xcodeproj"
-scheme "WWLayoutTV"
-destination "platform=tvOS Simulator,name=Apple TV"
workflows:
version: 2

Expand All @@ -107,4 +122,7 @@ workflows:
- build-and-test-swift51:
requires:
- build-gem-cache
- build-and-test-swiftpm:
requires:
- build-gem-cache

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ xcuserdata/
timeline.xctimeline
playground.xcworkspace

## Swift package manager
Packages/
Package.pins
Package.resolved
.swiftpm

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
Expand Down
26 changes: 26 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// swift-tools-version:5.1

import PackageDescription

let package = Package(
name: "WWLayout",
platforms: [
.iOS(.v10),
.tvOS(.v10)
],
products: [
.library(
name: "WWLayout",
targets: ["WWLayout"]),
],
dependencies: [
],
targets: [
.target(
name: "WWLayout",
dependencies: []),
.testTarget(
name: "WWLayoutTests",
dependencies: ["WWLayout"])
]
)
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ A more complicated example:

## Installation

### Swift Package Manager

The WWLayout Package URL is:

```
https://github.com/ww-tech/wwlayout.git
```

Add the package dependency to your Xcode project using the `File` -> `Swift Packages` -> `Add Package Dependency...` menu item.

### Cocoapods

Simply add WWLayout to your `Podfile`:
Expand Down
2 changes: 1 addition & 1 deletion Sources/WWLayout/Anchorable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public enum SpecialAnchorable {

case .safeArea:
// constraing a view to safeArea means constraining it to it's superview's safeAreaLayoutGuide
if #available(iOS 11.0, *) {
if #available(iOS 11.0, *), #available(tvOS 11.0, *) {
return superview.safeAreaLayoutGuide
}
// fall back to the superview left/right, and the controller's top/bottom layout guides
Expand Down
2 changes: 1 addition & 1 deletion Sources/WWLayout/Layout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public final class Layout {
// Figure out the current size traits for the view.
// Child view controllers can have their traits overridden, so start there.
var currentTraits: UITraitCollection
if #available(iOS 13.0, *) {
if #available(iOS 13.0, *), #available(tvOS 13.0, *) {
currentTraits = view.owningViewController()?.traitCollection ?? .current
}
else {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion WWLayout.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Pod::Spec.new do |s|

s.name = "WWLayout"
s.version = "0.6.0"
s.version = "0.7.0"
s.summary = "Swifty DSL for programmatic Auto Layout in iOS"
s.description = "WWLayout is an elegant way to add auto-layout constraints with code."
s.homepage = "https://ww-tech.github.io/wwlayout/"
Expand Down
117 changes: 58 additions & 59 deletions WWLayout.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions WWLayoutExample/WWLayoutExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.1;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -386,7 +386,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.1;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -402,7 +402,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = WWLayoutExample/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.weightwatchers.WWLayoutExample;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -420,7 +420,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = WWLayoutExample/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.weightwatchers.WWLayoutExample;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
Loading

0 comments on commit 6d31bf3

Please sign in to comment.