Skip to content
This repository was archived by the owner on Aug 13, 2021. It is now read-only.

Commit 65580d6

Browse files
author
Jeff Verkoeyen
committed
Merge branch 'release-candidate' into stable
2 parents c3140ba + 9726d78 commit 65580d6

File tree

200 files changed

+12392
-509
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+12392
-509
lines changed

.arcconfig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@
99
],
1010
"arcanist_configuration": "HookConphig",
1111
"phabricator.uri": "http://codereview.cc/",
12+
"repository.callsign": "REACTIVEMOTIONSWIFT",
1213
"arc.land.onto.default": "develop",
1314
"arc.feature.start.default": "origin/develop",
1415
"unit.xcode": {
1516
"build": {
16-
"workspace": "MaterialMotionStreams.xcworkspace",
17+
"workspace": "MaterialMotion.xcworkspace",
1718
"scheme": "UnitTests",
1819
"configuration": "Debug",
1920
"destination": "platform=iOS Simulator,name=iPhone 6s"
2021
},
2122
"coverage": {
22-
"product": "MaterialMotionStreams.framework/MaterialMotionStreams"
23+
"product": "MaterialMotion.framework/MaterialMotion"
2324
},
2425
"pre-build": "pod install"
2526
}

.jazzy.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
module: MaterialMotionStreams
1+
module: MaterialMotion
22
module_version: 1.0.0
33
sdk: iphonesimulator
44
xcodebuild_arguments:
55
- -workspace
6-
- MaterialMotionStreams.xcworkspace
6+
- MaterialMotion.xcworkspace
77
- -scheme
8-
- MaterialMotionStreams
9-
github_url: https://github.com/material-motion/streams-swift
10-
github_file_prefix: https://github.com/material-motion/streams-swift/tree/v1.0.0
8+
- MaterialMotion
9+
github_url: https://github.com/material-motion/material-motion-swift
10+
github_file_prefix: https://github.com/material-motion/material-motion-swift/tree/v1.0.0

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
language: objective-c
22
osx_image: xcode8.1
33
sudo: false
4-
notifications:
5-
email: false
64
before_install:
75
- gem install cocoapods --no-rdoc --no-ri --no-document --quiet
86
- git clone https://github.com/phacility/arcanist.git
@@ -12,6 +10,6 @@ before_install:
1210
script:
1311
- set -o pipefail
1412
- arcanist/bin/arc unit --everything --trace
15-
- xcodebuild build -workspace MaterialMotionStreams.xcworkspace -scheme Catalog -sdk "iphonesimulator10.1" -destination "name=iPhone 6s,OS=10.1" ONLY_ACTIVE_ARCH=YES | xcpretty -c;
13+
- xcodebuild build -workspace MaterialMotion.xcworkspace -scheme MaterialMotionCatalog -sdk "iphonesimulator10.1" -destination "name=iPhone 6s,OS=10.1" ONLY_ACTIVE_ARCH=YES | xcpretty -c;
1614
after_success:
1715
- bash <(curl -s https://codecov.io/bash)

CHANGELOG.md

Lines changed: 461 additions & 0 deletions
Large diffs are not rendered by default.

MaterialMotion.podspec

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Pod::Spec.new do |s|
2+
s.name = "MaterialMotion"
3+
s.summary = "Reactive motion driven by Core Animation."
4+
s.version = "1.0.0"
5+
s.authors = "The Material Motion Authors"
6+
s.license = "Apache 2.0"
7+
s.homepage = "https://github.com/material-motion/material-motion-swift"
8+
s.source = { :git => "https://github.com/material-motion/material-motion-swift.git", :tag => "v" + s.version.to_s }
9+
s.platform = :ios, "9.0"
10+
s.requires_arc = true
11+
12+
s.source_files = "src/**/*.{swift}"
13+
14+
s.dependency "IndefiniteObservable", "~> 3.0"
15+
end

MaterialMotionStreams.podspec

Lines changed: 0 additions & 28 deletions
This file was deleted.

Podfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
workspace 'MaterialMotionStreams.xcworkspace'
1+
workspace 'MaterialMotion.xcworkspace'
22
use_frameworks!
33

4-
target "Catalog" do
4+
target "MaterialMotionCatalog" do
55
pod 'CatalogByConvention'
6-
pod 'MaterialMotionStreams/examples', :path => './'
7-
project 'examples/apps/Catalog/Catalog.xcodeproj'
6+
pod 'MaterialMotion', :path => './'
7+
8+
project 'examples/apps/Catalog/MaterialMotionCatalog.xcodeproj'
89
end
910

1011
target "UnitTests" do
11-
project 'examples/apps/Catalog/Catalog.xcodeproj'
12-
pod 'MaterialMotionStreams/tests', :path => './'
12+
pod 'MaterialMotion', :path => './'
13+
14+
project 'examples/apps/Catalog/MaterialMotionCatalog.xcodeproj'
1315
end
1416

1517
post_install do |installer|

Podfile.lock

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
PODS:
2+
- CatalogByConvention (2.0.0)
3+
- IndefiniteObservable (3.1.0):
4+
- IndefiniteObservable/lib (= 3.1.0)
5+
- IndefiniteObservable/lib (3.1.0)
6+
- MaterialMotion (1.0.0):
7+
- IndefiniteObservable (~> 3.0)
8+
9+
DEPENDENCIES:
10+
- CatalogByConvention
11+
- MaterialMotion (from `./`)
12+
13+
EXTERNAL SOURCES:
14+
MaterialMotion:
15+
:path: "./"
16+
17+
SPEC CHECKSUMS:
18+
CatalogByConvention: be55c2263132e4f9f59299ac8a528ee8715b3275
19+
IndefiniteObservable: 2789d61f487d8d37fa2b9c3153cc44d4447ff744
20+
MaterialMotion: 967eed88a2f4add305ea8768bbc49283283c1e83
21+
22+
PODFILE CHECKSUM: f503265a0d60526a0d28c96dd4bdcfb40fb562fc
23+
24+
COCOAPODS: 1.2.0

README.md

Lines changed: 146 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,82 @@
1-
# Material Motion streams for Apple devices
2-
3-
[![Build Status](https://travis-ci.org/material-motion/streams-swift.svg?branch=develop)](https://travis-ci.org/material-motion/streams-swift)
4-
[![codecov](https://codecov.io/gh/material-motion/streams-swift/branch/develop/graph/badge.svg)](https://codecov.io/gh/material-motion/streams-swift)
5-
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/MaterialMotionStreams.svg)](https://cocoapods.org/pods/MaterialMotionStreams)
6-
[![Platform](https://img.shields.io/cocoapods/p/MaterialMotionStreams.svg)](http://cocoadocs.org/docsets/MaterialMotionStreams)
7-
[![Docs](https://img.shields.io/cocoapods/metrics/doc-percent/MaterialMotionStreams.svg)](http://cocoadocs.org/docsets/MaterialMotionStreams)
1+
# Material Motion
2+
3+
> Reactive motion driven by Core Animation.
4+
5+
![Swift 3.1.x](https://img.shields.io/badge/Swift-3.1.x-orange.svg)
6+
![iOS 9.0+](https://img.shields.io/badge/iOS-9.0+-orange.svg)
7+
[![Build Status](https://travis-ci.org/material-motion/material-motion-swift.svg?branch=develop)](https://travis-ci.org/material-motion/material-motion-swift)
8+
[![codecov](https://codecov.io/gh/material-motion/material-motion-swift/branch/develop/graph/badge.svg)](https://codecov.io/gh/material-motion/material-motion-swift)
9+
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/MaterialMotion.svg)](https://cocoapods.org/pods/MaterialMotion)
10+
[![Platform](https://img.shields.io/cocoapods/p/MaterialMotion.svg)](http://cocoadocs.org/docsets/MaterialMotion)
11+
[![Docs](https://img.shields.io/cocoapods/metrics/doc-percent/MaterialMotion.svg)](http://cocoadocs.org/docsets/MaterialMotion)
12+
13+
This library includes a variety of ready-to-use **interactions**. Interactions are registered to an
14+
instance of `MotionRuntime`:
15+
16+
```swift
17+
// Store me for as long as the interactions should take effect.
18+
let runtime = MotionRuntime(containerView: <#view#>)
19+
```
20+
21+
<table>
22+
<thead><tr><th></th><th>Interaction</th><th>Snippet</th></tr></thead>
23+
<tbody>
24+
<tr>
25+
<td align="center"><img src="assets/arcmove.gif" /></td>
26+
<td><pre><code class="language-swift">ArcMove</code></pre></td>
27+
<td><pre><code class="language-swift">let arcMove = ArcMove()
28+
arcMove.from.value = <#from#>
29+
arcMove.to.value = <#to#>
30+
runtime.add(arcMove, to: <#view#>)</code></pre></td>
31+
</tr>
32+
<tr>
33+
<td align="center"><img src="assets/directlymanipulable.gif" /></td>
34+
<td><pre><code class="language-swift">DirectlyManipulable</code></pre></td>
35+
<td><pre><code class="language-swift">runtime.add(DirectlyManipulable(), to: <#view#>)</code></pre></td>
36+
</tr>
37+
<tr>
38+
<td align="center"><img src="assets/draggable.gif" /></td>
39+
<td><pre><code class="language-swift">Draggable</code></pre></td>
40+
<td><pre><code class="language-swift">runtime.add(Draggable(), to: <#view#>)</code></pre></td>
41+
</tr>
42+
<tr>
43+
<td align="center"><img src="assets/rotatable.gif" /></td>
44+
<td><pre><code class="language-swift">Rotatable</code></pre></td>
45+
<td><pre><code class="language-swift">runtime.add(Rotatable(), to: <#view#>)</code></pre></td>
46+
</tr>
47+
<tr>
48+
<td align="center"><img src="assets/scalable.gif" /></td>
49+
<td><pre><code class="language-swift">Scalable</code></pre></td>
50+
<td><pre><code class="language-swift">runtime.add(Scalable(), to: <#view#>)</code></pre></td>
51+
</tr>
52+
<tr>
53+
<td align="center"><img src="assets/setpositionontap.gif" /></td>
54+
<td><pre><code class="language-swift">SetPositionOnTap</code></pre></td>
55+
<td><pre><code class="language-swift">runtime.add(SetPositionOnTap(),
56+
to: runtime.get(<#view#>.layer).position)</code></pre></td>
57+
</tr>
58+
<tr>
59+
<td align="center"><img src="assets/spring.gif" /></td>
60+
<td><pre><code class="language-swift">Spring</code></pre></td>
61+
<td><pre><code class="language-swift">let spring = Spring()
62+
spring.destination.value = <#initial destination#>
63+
runtime.add(spring, to: <#view#>)</code></pre></td>
64+
</tr>
65+
<tr>
66+
<td align="center"><img src="assets/tossable.gif" /></td>
67+
<td><pre><code class="language-swift">Tossable</code></pre></td>
68+
<td><pre><code class="language-swift">let tossable = Tossable()
69+
tossable.spring.destination.value = <#initial destination#>
70+
runtime.add(tossable, to: <#view#>)</code></pre></td>
71+
</tr>
72+
<tr>
73+
<td align="center"><img src="assets/tween.gif" /></td>
74+
<td><pre><code class="language-swift">Tween</code></pre></td>
75+
<td><pre><code class="language-swift">runtime.add(Tween(duration: 0.5, values: [1, 0]),
76+
to: runtime.get(<#view#>.layer).opacity)</code></pre></td>
77+
</tr>
78+
</tbody>
79+
</table>
880

981
## Installation
1082

@@ -17,9 +89,9 @@
1789
>
1890
> gem install cocoapods
1991
20-
Add `MaterialMotionStreams` to your `Podfile`:
92+
Add `MaterialMotion` to your `Podfile`:
2193

22-
pod 'MaterialMotionStreams'
94+
pod 'MaterialMotion'
2395

2496
Then run the following command:
2597

@@ -29,7 +101,7 @@ Then run the following command:
29101

30102
Import the framework:
31103

32-
@import MaterialMotionStreams;
104+
import MaterialMotion
33105

34106
You will now have access to all of the APIs.
35107

@@ -38,25 +110,80 @@ You will now have access to all of the APIs.
38110
Check out a local copy of the repo to access the Catalog application by running the following
39111
commands:
40112

41-
git clone https://github.com/material-motion/streams-swift.git
42-
cd streams-swift
113+
git clone https://github.com/material-motion/material-motion-swift.git
114+
cd material-motion-swift
43115
pod install
44-
open MaterialMotionStreams.xcworkspace
116+
open MaterialMotion.xcworkspace
117+
118+
## Case studies
119+
120+
### Carousel
121+
122+
<img src="assets/carousel.gif" />
123+
124+
A carousel with pages that scale in and fade out in reaction to their scroll position.
125+
126+
[View the source](examples/CarouselExample.swift).
127+
128+
### Contextual transition
129+
130+
<img src="assets/contextualtransition.gif" />
131+
132+
A contextual view can be used to create continuity during transitions between view controllers. In
133+
this case study the selected photo is the contextual view. It's possible to flick the view to
134+
dismiss it using the tossable interaction.
135+
136+
Makes use of: `Draggable`, `Tossable`, `Transition`, `TransitionSpring`, `Tween`.
137+
138+
[View the source](examples/ContextualTransitionExample.swift).
139+
140+
### Floating action button transition
141+
142+
<img src="assets/fabtransition.gif" />
143+
144+
A floating action button transition is a type of contextual transition that animates a mask outward
145+
from a floating button.
146+
147+
Makes use of: `Transition` and `Tween`.
148+
149+
[View the source](examples/FabTransitionExample.swift).
150+
151+
### Material expansion
152+
153+
<img src="assets/materialexpansion.gif" />
154+
155+
A Material Design transition using assymetric transformations.
156+
157+
Makes use of: `Tween`.
158+
159+
[View the source](examples/MaterialExpansionExample.swift).
160+
161+
### Modal dialog
162+
163+
<img src="assets/modaldialog.gif" />
164+
165+
A modal dialog that's presented over the existing context and is dismissable using gestures.
166+
167+
Makes use of: `Tossable` and `TransitionSpring`.
168+
169+
[View the source](examples/ModalDialogExample.swift).
170+
171+
### Sticker picker
45172

46-
## Guides
173+
<img src="assets/stickerpicker.gif" />
47174

48-
1. [Architecture](#architecture)
49-
2. [How to ...](#how-to-...)
175+
Each sticker is individually **directly manipulable**, meaning they can be dragged, rotated, and
176+
scaled using multitouch gestures.
50177

51-
### Architecture
178+
Makes use of: `DirectlyManipulable`.
52179

53-
### How to ...
180+
[View the source](examples/StickerPickerExample.swift).
54181

55182
## Contributing
56183

57184
We welcome contributions!
58185

59-
Check out our [upcoming milestones](https://github.com/material-motion/streams-swift/milestones).
186+
Check out our [upcoming milestones](https://github.com/material-motion/material-motion-swift/milestones).
60187

61188
Learn more about [our team](https://material-motion.github.io/material-motion/team/),
62189
[our community](https://material-motion.github.io/material-motion/team/community/), and

assets/arcmove.gif

102 KB
Loading

0 commit comments

Comments
 (0)