From 302d3c4ec526ffa942d23937fdfe8ef5163d473d Mon Sep 17 00:00:00 2001 From: featherless Date: Tue, 3 Oct 2017 10:52:08 -0400 Subject: [PATCH 1/5] Add nullability annotations to MDMTransitionNavigationControllerDelegate. (#46) --- src/MDMTransitionNavigationControllerDelegate.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/MDMTransitionNavigationControllerDelegate.h b/src/MDMTransitionNavigationControllerDelegate.h index 2b45185..2f32c48 100644 --- a/src/MDMTransitionNavigationControllerDelegate.h +++ b/src/MDMTransitionNavigationControllerDelegate.h @@ -38,20 +38,20 @@ NS_SWIFT_NAME(TransitionNavigationControllerDelegate) Only supported methods are exposed. */ -+ (instancetype)sharedInstance; ++ (nonnull instancetype)sharedInstance; /** Can be set as a navigation controller's delegate. */ -+ (id)sharedDelegate; ++ (nonnull id)sharedDelegate; #pragma mark Support -- (id)navigationController:(UINavigationController *)navigationController - animationControllerForOperation:(UINavigationControllerOperation)operation - fromViewController:(UIViewController *)fromVC - toViewController:(UIViewController *)toVC; -- (id)navigationController:(UINavigationController *)navigationController - interactionControllerForAnimationController:(id)animationController; +- (nullable id)navigationController:(nonnull UINavigationController *)navigationController + animationControllerForOperation:(UINavigationControllerOperation)operation + fromViewController:(nonnull UIViewController *)fromVC + toViewController:(nonnull UIViewController *)toVC; +- (nullable id)navigationController:(nonnull UINavigationController *)navigationController + interactionControllerForAnimationController:(nonnull id)animationController; @end From 3e1d9c96c4685cffdf9b6f6b25040862a88de474 Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Fri, 20 Oct 2017 15:59:42 -0400 Subject: [PATCH 2/5] Automatic changelog preparation for release. --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1de5632..18047f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# #develop# + + TODO: Enumerate changes. + + # 3.3.0 This minor release deprecates some behavior and replaces it with a new API. From fb50008e1c68f5a44a8d0ed4796f878307dc8e56 Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Mon, 2 Oct 2017 14:16:16 -0400 Subject: [PATCH 3/5] Update CHANGELOG.md. --- CHANGELOG.md | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18047f0..7ce178e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,69 @@ -# #develop# +# 4.0.0 - TODO: Enumerate changes. +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 + +- [Transitions would not complete if the presentation controller didn't implement the startWithContext method](https://github.com/material-motion/transitioning-objc/pull/45) + +## 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: + +```swift +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 + +* [Update Xcode build settings to Xcode 9 warnings and resolve build error.](https://github.com/material-motion/transitioning-objc/commit/5ed85cdc795ae6660901c5e2ae237732f04649e1) (Jeff Verkoeyen) +* [Rework multi-transition support using composition. (#43)](https://github.com/material-motion/transitioning-objc/commit/0b57361557476c7d3ecb8f4c9878da21a2e735ab) (featherless) +* [Fix the Swift symbol name for MDMTransitionDirection. (#44)](https://github.com/material-motion/transitioning-objc/commit/4cdcf4ca0324a1f83d572440887fe5a5d18ee00b) (featherless) +* [Fix bug where transitions would not complete if the presentation controller didn't implement the startWithContext method. (#45)](https://github.com/material-motion/transitioning-objc/commit/784328dae8509df0a2beb3a5afa9701f1e275950) (featherless) +* [Fix broken unit tests.](https://github.com/material-motion/transitioning-objc/commit/46c92ebcab642969ba70ea43aa512cac1cc3cad4) (Jeff Verkoeyen) +* [Add multi-transition support. (#40)](https://github.com/material-motion/transitioning-objc/commit/8653958a5a9419891861fb6fd7648791ca3c744c) (featherless) +* [Remove unused protocol forward declaration.](https://github.com/material-motion/transitioning-objc/commit/74c1655fc3614e5e9788db8b53e8bff83691137a) (Jeff Verkoeyen) + +## 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 + +* [Add platform to the Podfile per pod install recommendation.](https://github.com/material-motion/transitioning-objc/commit/7384187b2ddd6a2760f5279cabb5032ea3b1e24e) (Jeff Verkoeyen) # 3.3.0 From 17d3b40ca993eecb7ff65c22d241bc95b54cfa5e Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Fri, 20 Oct 2017 16:00:54 -0400 Subject: [PATCH 4/5] Bump the release. --- MotionTransitioning.podspec | 2 +- Podfile.lock | 8 ++++---- .../project.pbxproj | 18 ++++++++++++++++-- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/MotionTransitioning.podspec b/MotionTransitioning.podspec index 8c8eaf0..e0c9efd 100644 --- a/MotionTransitioning.podspec +++ b/MotionTransitioning.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "MotionTransitioning" s.summary = "Light-weight API for building UIViewController transitions." - s.version = "3.3.0" + s.version = "4.0.0" s.authors = "The Material Motion Authors" s.license = "Apache 2.0" s.homepage = "https://github.com/material-motion/transitioning-objc" diff --git a/Podfile.lock b/Podfile.lock index 23bc03c..453450b 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,6 +1,6 @@ PODS: - CatalogByConvention (2.1.1) - - MotionTransitioning (3.3.0) + - MotionTransitioning (4.0.0) DEPENDENCIES: - CatalogByConvention @@ -8,12 +8,12 @@ DEPENDENCIES: EXTERNAL SOURCES: MotionTransitioning: - :path: "./" + :path: ./ SPEC CHECKSUMS: CatalogByConvention: c3a5319de04250a7cd4649127fcfca5fe3322a43 - MotionTransitioning: caaa488e0469d93f004793b96a2ed04447af808d + MotionTransitioning: be4161ebcbff7911a1d9c4549e396f486041ca6f PODFILE CHECKSUM: 25d5942fb7698339a03667bb46c3fbb77529b92d -COCOAPODS: 1.2.1 +COCOAPODS: 1.3.1 diff --git a/examples/apps/Catalog/TransitionsCatalog.xcodeproj/project.pbxproj b/examples/apps/Catalog/TransitionsCatalog.xcodeproj/project.pbxproj index 6c1232b..ad8ec3e 100644 --- a/examples/apps/Catalog/TransitionsCatalog.xcodeproj/project.pbxproj +++ b/examples/apps/Catalog/TransitionsCatalog.xcodeproj/project.pbxproj @@ -530,13 +530,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-TransitionsCatalog-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; B07B7D3E33EA12345D5D53CC /* [CP] Embed Pods Frameworks */ = { @@ -545,9 +548,12 @@ files = ( ); inputPaths = ( + "${SRCROOT}/../../../Pods/Target Support Files/Pods-UnitTests/Pods-UnitTests-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/MotionTransitioning/MotionTransitioning.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MotionTransitioning.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -560,13 +566,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-UnitTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; EBE92D1BA3D06BD67925A4E0 /* [CP] Embed Pods Frameworks */ = { @@ -575,9 +584,14 @@ files = ( ); inputPaths = ( + "${SRCROOT}/../../../Pods/Target Support Files/Pods-TransitionsCatalog/Pods-TransitionsCatalog-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/CatalogByConvention/CatalogByConvention.framework", + "${BUILT_PRODUCTS_DIR}/MotionTransitioning/MotionTransitioning.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CatalogByConvention.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MotionTransitioning.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; From f08a19b7f1bae2c82924ee49e27454ba81032b0c Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Fri, 20 Oct 2017 16:03:57 -0400 Subject: [PATCH 5/5] Update the changelog. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ce178e..f159547 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ if let toolbar = foreDelegate.toolbar(for: self) { ## Source changes +* [Add nullability annotations to MDMTransitionNavigationControllerDelegate. (#46)](https://github.com/material-motion/motion-transitioning-objc/commit/302d3c4ec526ffa942d23937fdfe8ef5163d473d) (featherless) * [Update Xcode build settings to Xcode 9 warnings and resolve build error.](https://github.com/material-motion/transitioning-objc/commit/5ed85cdc795ae6660901c5e2ae237732f04649e1) (Jeff Verkoeyen) * [Rework multi-transition support using composition. (#43)](https://github.com/material-motion/transitioning-objc/commit/0b57361557476c7d3ecb8f4c9878da21a2e735ab) (featherless) * [Fix the Swift symbol name for MDMTransitionDirection. (#44)](https://github.com/material-motion/transitioning-objc/commit/4cdcf4ca0324a1f83d572440887fe5a5d18ee00b) (featherless)