From a9fdc77f2da1c2b23b1daf659f48160205dbc6e9 Mon Sep 17 00:00:00 2001 From: Javier Date: Fri, 5 Oct 2018 16:56:36 +0800 Subject: [PATCH] Update version --- .swift-version | 1 - .travis.yml | 6 +++--- Bamboo.podspec | 3 ++- README.md | 14 +++++++++++++- Source/Info.plist | 2 +- 5 files changed, 19 insertions(+), 7 deletions(-) delete mode 100644 .swift-version diff --git a/.swift-version b/.swift-version deleted file mode 100644 index 5186d07..0000000 --- a/.swift-version +++ /dev/null @@ -1 +0,0 @@ -4.0 diff --git a/.travis.yml b/.travis.yml index 1616f22..d00901e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,9 @@ language: objective-c -osx_image: xcode9 +osx_image: xcode10 env: - - SCHEME="Bamboo iOS" DESTINATION="platform=iOS Simulator,name=iPhone 7" + - SCHEME="Bamboo iOS" DESTINATION="platform=iOS Simulator,name=iPhone XS" - SCHEME="Bamboo macOS" DESTINATION="platform=macOS" - - SCHEME="Bamboo tvOS" DESTINATION="platform=tvOS Simulator,name=Apple TV 1080p" + - SCHEME="Bamboo tvOS" DESTINATION="platform=tvOS Simulator,name=Apple TV 4K" script: - set -o pipefail - xcodebuild -scheme "$SCHEME" -destination "$DESTINATION" test | xcpretty diff --git a/Bamboo.podspec b/Bamboo.podspec index d6387f5..c20d539 100644 --- a/Bamboo.podspec +++ b/Bamboo.podspec @@ -1,11 +1,12 @@ Pod::Spec.new do |s| s.name = 'Bamboo' - s.version = '1.1.0' + s.version = '1.2.0' s.summary = 'Auto Layout (and manual layout) in one line.' s.homepage = 'https://github.com/wordlessj/Bamboo' s.license = { :type => 'MIT', :file => 'LICENSE' } s.author = 'Javier Zhang' s.source = { :git => 'https://github.com/wordlessj/Bamboo.git', :tag => s.version.to_s } + s.swift_version = '4.2' s.ios.deployment_target = '9.0' s.osx.deployment_target = '10.11' diff --git a/README.md b/README.md index 25ef464..35e73d0 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](#carthage) [![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Bamboo.svg)](#cocoapods) -![Swift 4](https://img.shields.io/badge/Swift-4-orange.svg) +![Swift 4.2](https://img.shields.io/badge/Swift-4.2-orange.svg) ![Platform](https://img.shields.io/badge/platform-iOS%209.0%2B%20%7C%20macOS%2010.11%2B%20%7C%20tvOS%209.0%2B-lightgrey.svg) [![Build Status](https://travis-ci.org/wordlessj/Bamboo.svg?branch=master)](https://travis-ci.org/wordlessj/Bamboo) @@ -288,6 +288,18 @@ All `distribute` methods come with an optional `inset` parameter, you can specif [view1, view2, view3].bb.distributeXEqualSpacing(inset: .equal) ``` +### Group + +If you want to activate/deactivate a set of constraints in response to some events, you can use `group()` to collect constraints into an array. + +```swift +let constraints: [NSLayoutConstraint] = group { + view1.bb.fill() + view2.bb.left().top().size(100) + view3.bb.fillBottom().height(100) +} +``` + ## Manual Layout Why manual layout when there is Auto Layout? Well, Auto Layout is good, but it has some performance issues, that’s when you may want to switch to manual layout. diff --git a/Source/Info.plist b/Source/Info.plist index 5cac9b5..741f407 100644 --- a/Source/Info.plist +++ b/Source/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.1.0 + 1.2.0 CFBundleSignature ???? CFBundleVersion