|
| 1 | +# 1.1.0 |
| 2 | + |
| 3 | +This is our first minor release. It includes two new interactions and improvements to APIs for the common cases. |
| 4 | + |
| 5 | +<img src="assets/changedirection.gif" /><img src="assets/pulldowntodismiss.gif" /> |
| 6 | + |
| 7 | +## Behavioral changes |
| 8 | + |
| 9 | +- TransitionSpring's configuration now defaults to Core Animation's default values. If you prefer to continue using the original Spring defaults you can use the following snippet: |
| 10 | + |
| 11 | +```swift |
| 12 | +spring.tension.value = defaultSpringTension |
| 13 | +spring.friction.value = defaultSpringFriction |
| 14 | +spring.mass.value = defaultSpringMass |
| 15 | +spring.suggestedDuration.value = 0 |
| 16 | +``` |
| 17 | + |
| 18 | +## New deprecations |
| 19 | + |
| 20 | +- Tossable's `init(system:draggable:)` is deprecated in favor of `init(spring:draggable:)`. |
| 21 | + |
| 22 | +## New features |
| 23 | + |
| 24 | +New interactions: `ChangeDirection` and `SlopRegion`. |
| 25 | + |
| 26 | +Gesturable interactions can now be initialized with a sequence of gesture recognizers. This makes it easier to create gesturable interactions in transitions where the gesture recognizers are provided as a set. |
| 27 | + |
| 28 | +Spring's system now defaults to Core Animation. |
| 29 | + |
| 30 | +There is a new API for getting a gesture recognizer delegate that's able to coordinate a "drag to dismiss" transition with a vertical scroll view. |
| 31 | + |
| 32 | +```swift |
| 33 | +let pan = UIPanGestureRecognizer() |
| 34 | +pan.delegate = transitionController.dismisser.topEdgeDismisserDelegate(for: scrollView) |
| 35 | +``` |
| 36 | + |
| 37 | +## Source changes |
| 38 | + |
| 39 | +* [Store interactions before adding them so that order is maintained when interactions add other interactions.](https://github.com/material-motion/material-motion-swift/commit/5d0af5fa77b913c0706837d1f0bbf3e14ce9f1ad) (Jeff Verkoeyen) |
| 40 | +* [Avoid over-completion of chained property animations.](https://github.com/material-motion/material-motion-swift/commit/51ee058ddc3a15164f4a3c22c522cf3e6fd280c9) (Jeff Verkoeyen) |
| 41 | +* [Fix bug causing properties-chained-to-properties to not animate correctly.](https://github.com/material-motion/material-motion-swift/commit/9e810bbf0ddce9764c76ea44dc223ccee4fca0b7) (Jeff Verkoeyen) |
| 42 | +* [Add SlopRegion interaction.](https://github.com/material-motion/material-motion-swift/commit/2655adc561181c0679f52df2ca23646abf7876cb) (Jeff Verkoeyen) |
| 43 | +* [Add topEdgeDismisserDelegate API to ViewControllerDismisser.](https://github.com/material-motion/material-motion-swift/commit/ad32ba9e7200b59e799d57c0c964b19be55089c3) (Jeff Verkoeyen) |
| 44 | +* [Add Gesturable convenience initializer for extracting the first gesture recognizer from a sequence of gesture recognizers.](https://github.com/material-motion/material-motion-swift/commit/c4e0b3d0bf5c2b53e0046c08b63f0592b99b4b46) (Jeff Verkoeyen) |
| 45 | +* [Rename ChangeDirectionOnRelease(of:) to ChangeDirection(withVelocityOf:)](https://github.com/material-motion/material-motion-swift/commit/c999a3a5134331e79f3cce74d2be222780155054) (Jeff Verkoeyen) |
| 46 | +* [Fix crashing bug when connecting properties to one another.](https://github.com/material-motion/material-motion-swift/commit/840d97cd68321dd241e157ed9527cdc83ed73489) (Jeff Verkoeyen) |
| 47 | +* [Add ChangeDirectionOnRelease interaction.](https://github.com/material-motion/material-motion-swift/commit/bdee45533c68f2c98e7b543acf9e3589a783eb46) (Jeff Verkoeyen) |
| 48 | +* [Make TransitionSpring and Spring T type conform to Subtractable so that coreAnimation can be set as the default system.](https://github.com/material-motion/material-motion-swift/commit/419327972893b92a4317e903ad933550d096a76f) (Jeff Verkoeyen) |
| 49 | +* [TransitionSpring configuration now defaults to Core Animation configuration defaults.](https://github.com/material-motion/material-motion-swift/commit/295d64556048429a5ec6d7859a0ce8922b84a4fd) (Jeff Verkoeyen) |
| 50 | + |
| 51 | +## API changes |
| 52 | + |
| 53 | +Auto-generated by running: |
| 54 | + |
| 55 | + apidiff origin/stable release-candidate swift MaterialMotion.xcworkspace MaterialMotion |
| 56 | + |
| 57 | +### New global constants |
| 58 | + |
| 59 | +*new* global var: `defaultTransitionSpringFriction` |
| 60 | + |
| 61 | +*new* global var: `defaultTransitionSpringSuggestedDuration` |
| 62 | + |
| 63 | +*new* global var: `defaultTransitionSpringTension` |
| 64 | + |
| 65 | +*new* global var: `defaultTransitionSpringMass` |
| 66 | + |
| 67 | +### New interactions |
| 68 | + |
| 69 | +*new* class: `ChangeDirection` |
| 70 | + |
| 71 | +*new* class: `SlopRegion` |
| 72 | + |
| 73 | +### Modified interactions |
| 74 | + |
| 75 | +#### Gesturable |
| 76 | + |
| 77 | +Affects `Draggable`, `Rotatable`, and `Scalable`. |
| 78 | + |
| 79 | +*new* method: `init(withFirstGestureIn:)` in `Gesturable` |
| 80 | + |
| 81 | +#### Spring |
| 82 | + |
| 83 | +| Type of change: | Declaration | |
| 84 | +|---|---| |
| 85 | +| From: | `public class Spring<T> : Interaction, Togglable, Stateful where T : Zeroable` | |
| 86 | +| To: | `public class Spring<T> : Interaction, Togglable, Stateful where T : Subtractable, T : Zeroable` | |
| 87 | + |
| 88 | +*modified* method: `init(threshold:system:)` in `Spring` |
| 89 | + |
| 90 | +| Type of change: | Declaration | |
| 91 | +|---|---| |
| 92 | +| From: | `public init(threshold: CGFloat, system: @escaping SpringToStream<T>)` | |
| 93 | +| To: | `public init(threshold: CGFloat = 1, system: @escaping SpringToStream<T> = coreAnimation)` | |
| 94 | + |
| 95 | +#### Tossable |
| 96 | + |
| 97 | +*modified* method: `init(spring:draggable:)` in `Tossable` |
| 98 | + |
| 99 | +| Type of change: | Declaration | |
| 100 | +|---|---| |
| 101 | +| From: | `public init(spring: Spring<CGPoint>, draggable: Draggable = Draggable())` | |
| 102 | +| To: | `public init(spring: Spring<CGPoint> = Spring(), draggable: Draggable = Draggable())` | |
| 103 | + |
| 104 | +*deprecated* method: `init(system:draggable:)` in `Tossable`. Use `init(spring:draggable:)` instead. |
| 105 | + |
| 106 | +#### TransitionSpring |
| 107 | + |
| 108 | +*modified* class: `TransitionSpring` |
| 109 | + |
| 110 | +| Type of change: | Declaration | |
| 111 | +|---|---| |
| 112 | +| From: | `public final class TransitionSpring<T> : Spring<T> where T : Zeroable` | |
| 113 | +| To: | `public final class TransitionSpring<T> : Spring<T> where T : Subtractable, T : Zeroable` | |
| 114 | + |
| 115 | +*modified* method: `init(back:fore:direction:threshold:system:)` in `TransitionSpring` |
| 116 | + |
| 117 | +| Type of change: | Declaration | |
| 118 | +|---|---| |
| 119 | +| From: | `public init(back backwardDestination: T, fore forwardDestination: T, direction: ReactiveProperty<TransitionDirection>, threshold: CGFloat, system: @escaping SpringToStream<T>)` | |
| 120 | +| To: | `public init(back backwardDestination: T, fore forwardDestination: T, direction: ReactiveProperty<TransitionDirection>, threshold: CGFloat = default, system: @escaping SpringToStream<T> = default)` | |
| 121 | + |
| 122 | +### Transitions |
| 123 | + |
| 124 | +#### ViewControllerDismisser |
| 125 | + |
| 126 | +*new* method: `topEdgeDismisserDelegate(for:)` in `ViewControllerDismisser` |
| 127 | + |
| 128 | +### Stream changes |
| 129 | + |
| 130 | +*new* var: `onCompletion` in `CoreAnimationChannelAdd` |
| 131 | + |
| 132 | +*removed* var: `onCompletion` in `CoreAnimationChannelAdd` |
| 133 | + |
| 134 | +## Non-source changes |
| 135 | + |
| 136 | +* [Modify the PushBackTransition example to use connected properties instead of multiple springs.](https://github.com/material-motion/material-motion-swift/commit/71f06c23ec9ef8f460ad48de6f6af540f1eec4c9) (Jeff Verkoeyen) |
| 137 | +* [Simplify the interactive push back transition example.](https://github.com/material-motion/material-motion-swift/commit/b8620649aae2eadf93ec66c82b164759a067931d) (Jeff Verkoeyen) |
| 138 | +* [Add syntax highlighting languages to the README.](https://github.com/material-motion/material-motion-swift/commit/486cff7dc497a66c5479f8117a599cf778fa575a) (Jeff Verkoeyen) |
| 139 | +* [Add example Podfile to the README.](https://github.com/material-motion/material-motion-swift/commit/687e6cc01dc82bd114a5f4f913cee54dc5071806) (Jeff Verkoeyen) |
| 140 | + |
1 | 141 | # 1.0.0 |
2 | 142 |
|
3 | 143 | Initial stable release of Material Motion. Includes: |
|
0 commit comments