Skip to content
This repository has been archived by the owner on Nov 21, 2017. It is now read-only.

Commit

Permalink
Merge branch 'release-candidate' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Verkoeyen committed Nov 16, 2016
2 parents 434f397 + 076d6fc commit 0b2d2e0
Show file tree
Hide file tree
Showing 20 changed files with 565 additions and 181 deletions.
5 changes: 3 additions & 2 deletions .arcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@
],
"arcanist_configuration": "HookConphig",
"phabricator.uri": "http://codereview.cc/",
"repository.callsign": "MDMCASWIFT",
"arc.land.onto.default": "develop",
"arc.feature.start.default": "origin/develop",
"unit.xcode": {
"build": {
"workspace": "MaterialMotionCoreAnimationFamily.xcworkspace",
"workspace": "MaterialMotionCoreAnimation.xcworkspace",
"scheme": "UnitTests",
"configuration": "Debug",
"destination": "platform=iOS Simulator,name=iPhone 6s"
},
"coverage": {
"product": "MaterialMotionCoreAnimationFamily.framework/MaterialMotionCoreAnimationFamily"
"product": "MaterialMotionCoreAnimation.framework/MaterialMotionCoreAnimation"
},
"pre-build": "pod install"
}
Expand Down
12 changes: 6 additions & 6 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module: MaterialMotionCoreAnimationFamily
module_version: 1.1.0
module: MaterialMotionCoreAnimation
module_version: 2.0.0
sdk: iphonesimulator
xcodebuild_arguments:
- -workspace
- MaterialMotionCoreAnimationFamily.xcworkspace
- MaterialMotionCoreAnimation.xcworkspace
- -scheme
- MaterialMotionCoreAnimationFamily
github_url: https://github.com/material-motion/material-motion-family-coreanimation-swift
github_file_prefix: https://github.com/material-motion/material-motion-family-coreanimation-swift/tree/v1.1.0
- MaterialMotionCoreAnimation
github_url: https://github.com/material-motion/coreanimation-swift
github_file_prefix: https://github.com/material-motion/coreanimation-swift/tree/v2.0.0
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ before_install:
script:
- set -o pipefail
- arcanist/bin/arc unit --everything --trace
- xcodebuild build -workspace MaterialMotionCoreAnimationFamily.xcworkspace -scheme Catalog -sdk "iphonesimulator10.0" -destination "name=iPhone 6s,OS=10.0" ONLY_ACTIVE_ARCH=YES | xcpretty -c;
- xcodebuild build -workspace MaterialMotionCoreAnimation.xcworkspace -scheme Catalog -sdk "iphonesimulator10.0" -destination "name=iPhone 6s,OS=10.0" ONLY_ACTIVE_ARCH=YES | xcpretty -c;
after_success:
- bash <(curl -s https://codecov.io/bash)
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This is the list of Core Animation Material Motion Family authors for copyright purposes.
# This is the list of Core Animation for Material Motion (Swift) authors for copyright purposes.
#
# This does not necessarily list everyone who has contributed code, since in
# some cases, their employer may be the copyright holder. To see the full list
Expand Down
68 changes: 68 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,71 @@
# 2.0.0

## Breaking changes

- A Tween with a null to value and non-null from value is no longer supported.

## New features

Tweens can now be scrubbed along a Timeline using the optional `timeline` property.

```
// To associate a timeline with a tween:
tween.timeline = timeline
// To scrub the associated tweens:
timeline.scrubber?.timeOffset = 0.1
```

Tween API now supports an arbitrary number of values. The old from/to APIs have been deprecated.

## Source changes

* [Remove UIView support from Tween performer.](https://github.com/material-motion/coreanimation-swift/commit/0a5a4ca70e9cac341487534e6d5967f2d4b4fff3) (Jeff Verkoeyen)
* [Convert from absolute time to local time.](https://github.com/material-motion/coreanimation-swift/commit/d9eaa540ae4648e77e81f139e97ba3e020ee8473) (Jeff Verkoeyen)
* [Add timeline property to Tween.](https://github.com/material-motion/coreanimation-swift/commit/0978987e5d996d4580ff32e2212e789d7b8a1f15) (Jeff Verkoeyen)
* [Drop Family suffix and update naming throughout the repo.](https://github.com/material-motion/coreanimation-swift/commit/d8eb169d2ab4e29a63ff89ae47942524069da818) (Jeff Verkoeyen)
* [Ensure that we still support from/to/timingFunction with the new APIs.](https://github.com/material-motion/coreanimation-swift/commit/edb1c5bd80c916ce3809e4140172979bbf1c5d58) (Jeff Verkoeyen)
* [Add a recommendation to the timingFunction deprecation message.](https://github.com/material-motion/coreanimation-swift/commit/5bf40939bfef9822d24a7811a942f71a41741bc5) (Jeff Verkoeyen)
* [Implement new keyframe-based Tween API.](https://github.com/material-motion/coreanimation-swift/commit/6200e00fd4cc2fc1a684ea740087444145022f8a) (Jeff Verkoeyen)

## API changes

### Tween

*new* method: `commitToValue(to:)` in `Tween`

*new* method: `commitFirstValue(to:)` in `Tween`

*new* var: `values` in `Tween`

*new* var: `timingFunctions` in `Tween`

*new* var: `timeline` in `Tween`

*new* var: `keyPositions` in `Tween`

*new* method: `init(_:duration:values:)` in `Tween`

*deprecated* method: `commitFromValue(to:)` in `Tween`

*deprecated* method: `commitLastValue(to:)` in `Tween`

*deprecated* method: `init(_:duration:)` in `Tween`

*deprecated* var: `from` in `Tween`

*deprecated* var: `to` in `Tween`

*deprecated* var: `timingFunction` in `Tween`

## Non-source changes

* [Automatic changelog preparation for release.](https://github.com/material-motion/coreanimation-swift/commit/78bd1a249f36e8001611c44d4c466451df05df4b) (Jeff Verkoeyen)
* [Update Runtime dependeny to v6.](https://github.com/material-motion/coreanimation-swift/commit/9fb3ff3029343f29b55a642b0b0bc35e3536ba1d) (Jeff Verkoeyen)
* [Add callsign.](https://github.com/material-motion/coreanimation-swift/commit/5c1d17271914b5b5dead44b9b70a7dcf05230e79) (Jeff Verkoeyen)
* [Update README.md with new values API.](https://github.com/material-motion/coreanimation-swift/commit/c4079f65ad1dca1b2d240c6f2835cbe4ce0cdfa9) (Jeff Verkoeyen)
* [Update README.md](https://github.com/material-motion/coreanimation-swift/commit/e51953f5f249c67889e7571d04452d76a7dd905e) (featherless)

# 1.1.0

This release adds support for Runtime v5.
Expand Down
15 changes: 15 additions & 0 deletions MaterialMotionCoreAnimation.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Pod::Spec.new do |s|
s.name = "MaterialMotionCoreAnimation"
s.summary = "Core Animation for Material Motion (Swift)"
s.version = "2.0.0"
s.authors = "The Material Motion Authors"
s.license = "Apache 2.0"
s.homepage = "https://github.com/material-motion/coreanimation-swift"
s.source = { :git => "https://github.com/material-motion/coreanimation-swift.git", :tag => "v" + s.version.to_s }
s.platform = :ios, "8.0"
s.requires_arc = true

s.source_files = "src/*.{swift}", "src/private/*.{swift}"

s.dependency "MaterialMotionRuntime", "~> 6.0"
end
15 changes: 0 additions & 15 deletions MaterialMotionCoreAnimationFamily.podspec

This file was deleted.

8 changes: 4 additions & 4 deletions Podfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
abstract_target 'MaterialMotionCoreAnimationFamily' do
pod 'MaterialMotionRuntime', "~> 5.0"
abstract_target 'MaterialMotionCoreAnimation' do
pod 'MaterialMotionRuntime'
pod 'CatalogByConvention'

pod 'MaterialMotionCoreAnimationFamily', :path => './'
pod 'MaterialMotionCoreAnimation', :path => './'

workspace 'MaterialMotionCoreAnimationFamily.xcworkspace'
workspace 'MaterialMotionCoreAnimation.xcworkspace'
use_frameworks!

target "Catalog" do
Expand Down
18 changes: 9 additions & 9 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
PODS:
- CatalogByConvention (2.0.0)
- MaterialMotionCoreAnimationFamily (1.1.0):
- MaterialMotionRuntime (< 6.0, >= 4.0)
- MaterialMotionRuntime (5.0.0)
- MaterialMotionCoreAnimation (2.0.0):
- MaterialMotionRuntime (~> 6.0)
- MaterialMotionRuntime (6.0.0)

DEPENDENCIES:
- CatalogByConvention
- MaterialMotionCoreAnimationFamily (from `./`)
- MaterialMotionRuntime (~> 5.0)
- MaterialMotionCoreAnimation (from `./`)
- MaterialMotionRuntime

EXTERNAL SOURCES:
MaterialMotionCoreAnimationFamily:
MaterialMotionCoreAnimation:
:path: "./"

SPEC CHECKSUMS:
CatalogByConvention: be55c2263132e4f9f59299ac8a528ee8715b3275
MaterialMotionCoreAnimationFamily: 7d1eb6d4b6536164a5976308c231098c44a2c730
MaterialMotionRuntime: 620695e40aaf12f728342cef0b784b1d3eaa1125
MaterialMotionCoreAnimation: 2aeed14a85e8548cb6ad216abb35c945103ea914
MaterialMotionRuntime: 89cb395df1ce02134fc67a16b42dc4492b6c514c

PODFILE CHECKSUM: edb0fc54ffa8aa6363ab6f520ae4e22f74ff4f79
PODFILE CHECKSUM: 324a763c20e46395a80439d82b6dadd51839da48

COCOAPODS: 1.1.1
92 changes: 59 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Core Animation Material Motion Family
# Core Animation for Material Motion (Swift)

[![Build Status](https://travis-ci.org/material-motion/material-motion-family-coreanimation-swift.svg?branch=develop)](https://travis-ci.org/material-motion/material-motion-family-coreanimation-swift)
[![codecov](https://codecov.io/gh/material-motion/material-motion-family-coreanimation-swift/branch/develop/graph/badge.svg)](https://codecov.io/gh/material-motion/material-motion-family-coreanimation-swift)
[![Build Status](https://travis-ci.org/material-motion/coreanimation-swift.svg?branch=develop)](https://travis-ci.org/material-motion/coreanimation-swift)
[![codecov](https://codecov.io/gh/material-motion/coreanimation-swift/branch/develop/graph/badge.svg)](https://codecov.io/gh/material-motion/coreanimation-swift)

The Core Animation Material Motion family provides a bridge between
This library provides a bridge between
[Core Animation](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CoreAnimation_guide/Introduction/Introduction.html) and the
[Material Motion runtime](https://github.com/material-motion/material-motion-runtime-objc).
[Material Motion runtime](https://github.com/material-motion/runtime-objc).

## Supported languages

Expand All @@ -14,15 +14,16 @@ The Core Animation Material Motion family provides a bridge between

## Features

`Tween` uses Core Animation's CABasicAnimation to animate a CALayer property along an easing curve.
`Tween` uses Core Animation's CAKeyframeAnimation to animate a CALayer property along an easing
curve.

Use a Tween like you would use a CABasicAnimation instance: provide a key path, duration, and one or
both of the from/to value.
Use a Tween like you would use a CAKeyframeAnimation instance: provide a key path, duration, and
an array of values.

```swift
let tweenBackgroundColor = Tween("backgroundColor", duration: animDuration)
tweenBackgroundColor.from = UIColor.orange.cgColor
tweenBackgroundColor.to = UIColor.lightGray.cgColor
let tweenBackgroundColor = Tween("backgroundColor",
duration: animDuration,
values: [UIColor.orange.cgColor, UIColor.lightGray.cgColor])
scheduler.addPlan(tweenBackgroundColor, to: myView)
```

Expand All @@ -32,13 +33,13 @@ Tween's properties map to the following Core Animation properties:
|:-----:|:--------------:|
| delay | delay |
| duration | duration |
| from | fromValue |
| keyPath | keyPath |
| to | toValue |
| timingFunction | timingFunction |
| keyPositions | keyTimes |
| timingFunctions | timingFunctions |
| values | values |

No other Core Animation properties are presently supported. View our filed
[feature requests](https://github.com/material-motion/material-motion-family-coreanimation-swift/labels/Feature%20request)
[feature requests](https://github.com/material-motion/coreanimation-swift/labels/Feature%20request)
to track progress on supporting additional functionality.

## Installation
Expand All @@ -52,9 +53,9 @@ to track progress on supporting additional functionality.
>
> gem install cocoapods
Add `MaterialMotionCoreAnimationFamily` to your `Podfile`:
Add `MaterialMotionCoreAnimation` to your `Podfile`:

pod 'MaterialMotionCoreAnimationFamily'
pod 'MaterialMotionCoreAnimation'

Then run the following command:

Expand All @@ -64,7 +65,7 @@ Then run the following command:

Import the framework:

@import MaterialMotionCoreAnimationFamily;
@import MaterialMotionCoreAnimation;

You will now have access to all of the APIs.

Expand All @@ -73,10 +74,10 @@ You will now have access to all of the APIs.
Check out a local copy of the repo to access the Catalog application by running the following
commands:

git clone https://github.com/material-motion/material-motion-family-coreanimation-swift.git
cd material-motion-family-coreanimation-swift
git clone https://github.com/material-motion/coreanimation-swift.git
cd coreanimation-swift
pod install
open MaterialMotionCoreAnimationFamily.xcworkspace
open MaterialMotionCoreAnimation.xcworkspace

## Guides

Expand All @@ -90,18 +91,41 @@ Code snippets:
***In Objective-C:***

```objc
MDMTween *tween = [[MDMTween alloc] initWithKeyPath:@"<#key path#>" duration:<#duration#>];
tween.from = <#from value#>;
tween.to = <#to value#>;
MDMTween *tween = [[MDMTween alloc] initWithKeyPath:@"<#key path#>"
duration:<#duration#>
values:@[<#values...#>]];
[scheduler addPlan:tween to:<#Object#>];
```
***In Swift:***
```swift
let tween = Tween(<#key path#>, duration: <#duration#>)
tween.from = <#from value#>
tween.to = <#to value#>
let tween = Tween(<#key path#>, duration: <#duration#>, values: [<#values...#>])
scheduler.addPlan(tween, to: <#Object#>)
```

### How to animate a property with just a destination value

Provide Tween with a single value and it will treat this value as the `toValue` of a
CABasicAnimation. As per the Core Animation documentation:

> Interpolates between the layer's current value of the property in the render tree and `toValue'.
Code snippets:

***In Objective-C:***

```objc
MDMTween *tween = [[MDMTween alloc] initWithKeyPath:@"<#key path#>"
duration:<#duration#>
values:@[<#value#>]];
[scheduler addPlan:tween to:<#Object#>];
```
***In Swift:***
```swift
let tween = Tween(<#key path#>, duration: <#duration#>, values: [<#value#>])
scheduler.addPlan(tween, to: <#Object#>)
```

Expand All @@ -116,24 +140,26 @@ Code snippets:
***In Objective-C:***

```objc
[tween commitToValueTo:<#CALayer#>]
[tween commitFirstValueTo:<#CALayer#>];
[tween commitLastValueTo:<#CALayer#>];
```
***In Swift:***
```swift
tween.commitToValue(to: <#CALayer#>)
tween.commitFirstValue(to: <#CALayer#>)
tween.commitLastValue(to: <#CALayer#>)
```

## Contributing

We welcome contributions!

Check out our [upcoming milestones](https://github.com/material-motion/material-motion-family-coreanimation-swift/milestones).
Check out our [upcoming milestones](https://github.com/material-motion/coreanimation-swift/milestones).

Learn more about [our team](https://material-motion.gitbooks.io/material-motion-team/content/),
[our community](https://material-motion.gitbooks.io/material-motion-team/content/community/), and
our [contributor essentials](https://material-motion.gitbooks.io/material-motion-team/content/essentials/).
Learn more about [our team](https://material-motion.github.io/material-motion/team/),
[our community](https://material-motion.github.io/material-motion/team/community/), and
our [contributor essentials](https://material-motion.github.io/material-motion/team/essentials/).

## License

Expand Down
Loading

0 comments on commit 0b2d2e0

Please sign in to comment.