Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

v4.0.0

Compare
Choose a tag to compare
@jverkoey jverkoey released this 20 Oct 20:34
· 50 commits to stable since this release

This major release adds support for composable transitions. See the catalog app for a variety of
examples making use of this new functionality.

Fixed issues

Breaking changes

  • MDMTransitionWithFallback's return value is now nonnull. If you depended on the nil behavior,
    you must now conform to the new protocol MDMTransitionWithFeasibility and return NO for
    canPerformTransitionWithContext:.
  • MDMTransitionDirection has been renamed to TransitionDirection in Swift.

New features

MDMTransitionWithFeasibility allows a transition to indicate whether it is capable of performing
the transition with a given context.

The new composeWithTransition: API on MDMTransitionContext makes it possible to build modular
transition objects that delegate responsibility out to other transition objects. View the
PhotoAlbumTransition example transition to see the following code in action:

context.compose(with: FadeTransition(target: .foreView, style: .fadeIn))
context.compose(with: SpringFrameTransition(target: .target(snapshotContextView),
                                            size: fitSize))

if let toolbar = foreDelegate.toolbar(for: self) {
  context.compose(with: SlideUpTransition(target: .target(toolbar)))
}

Source changes

API changes

MDMTransitionWithCustomDuration

changed protocol MDMTransitionWithCustomDuration now conforms to MDMTransition.

MDMTransitionWithFallback

changed protocol MDMTransitionWithFallback now conforms to MDMTransition.

MDMTransitionWithFeasibility

new protocol MDMTransitionWithFeasibility.

MDMTransitionContext

new method composeWithTransition:

Non-source changes