Skip to content
This repository has been archived by the owner on Aug 30, 2023. 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 28, 2017
2 parents 1991d50 + 37fb9de commit 994fd02
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 21 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# 5.0.0

This major change introduces a breaking API change for Swift clients.

## Breaking changes

**Swift only**: The UIViewController extension property `transitionController` has been renamed to `mdm_transitionController`.

## Source changes

* [[breaking] Rename the transitionController Swift API to mdm_transitionController. (#59)](https://github.com/material-motion/motion-transitioning-objc/commit/7b3f0c28bc43ed25248fad2e197228fc815b0909) (featherless)

## API changes

### UIViewController

**renamed (swift)** method: `transitionController` to `mdm_transitionController`.

# 4.0.2

This patch release fixes a bug where the frames of custom presented views would be incorrectly set
Expand Down
2 changes: 1 addition & 1 deletion MotionTransitioning.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "MotionTransitioning"
s.summary = "Light-weight API for building UIViewController transitions."
s.version = "4.0.2"
s.version = "5.0.0"
s.authors = "The Material Motion Authors"
s.license = "Apache 2.0"
s.homepage = "https://github.com/material-motion/transitioning-objc"
Expand Down
4 changes: 2 additions & 2 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PODS:
- CatalogByConvention (2.1.1)
- MotionTransitioning (4.0.2)
- MotionTransitioning (5.0.0)

DEPENDENCIES:
- CatalogByConvention
Expand All @@ -12,7 +12,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
CatalogByConvention: c3a5319de04250a7cd4649127fcfca5fe3322a43
MotionTransitioning: 9885e68bd1501f1f8244b2e40081acd8cf3ac461
MotionTransitioning: 23d25edc2f4606efb922403cbac6d81af37aa33a

PODFILE CHECKSUM: 25d5942fb7698339a03667bb46c3fbb77529b92d

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ you can pick the custom transition you want to use:

```swift
let viewController = MyViewController()
viewController.transitionController.transition = CustomTransition()
viewController.mdm_transitionController.transition = CustomTransition()
present(viewController, animated: true)
```

Expand Down Expand Up @@ -129,7 +129,7 @@ and dismissal of our view controller:
```swift
let viewController = MyViewController()
viewController.transitionController.transition = FadeTransition()
viewController.mdm_transitionController.transition = FadeTransition()
present(viewController, animated: true)
```

Expand Down
2 changes: 1 addition & 1 deletion examples/ContextualExample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ContextualExampleViewController: ExampleViewController {
// Note that in this example we're populating the contextual transition with the tapped view.
// Our rudimentary transition will animate the context view to the center of the screen from its
// current location.
controller.transitionController.transition = CompositeTransition(transitions: [
controller.mdm_transitionController.transition = CompositeTransition(transitions: [
FadeTransition(target: .foreView),
ContextualTransition(contextView: tapGesture.view!)
])
Expand Down
2 changes: 1 addition & 1 deletion examples/CustomPresentationExample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ extension CustomPresentationExampleViewController {
extension CustomPresentationExampleViewController {
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let modal = ModalViewController()
modal.transitionController.transition = transitions[indexPath.row].transition
modal.mdm_transitionController.transition = transitions[indexPath.row].transition
showDetailViewController(modal, sender: self)
}
}
2 changes: 1 addition & 1 deletion examples/FadeExample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class FadeExampleViewController: ExampleViewController {
// controller that you'll make use of is the `transition` property. Setting this property will
// dictate how the view controller is presented. For this example we've built a custom
// FadeTransition, so we'll make use of that now:
modalViewController.transitionController.transition = FadeTransition(target: .foreView)
modalViewController.mdm_transitionController.transition = FadeTransition(target: .foreView)

// Note that once we assign the transition object to the view controller, the transition will
// govern all subsequent presentations and dismissals of that view controller instance. If we
Expand Down
2 changes: 1 addition & 1 deletion examples/MenuExample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class MenuExampleViewController: ExampleViewController {

func didTap() {
let modalViewController = ModalViewController()
modalViewController.transitionController.transition = MenuTransition()
modalViewController.mdm_transitionController.transition = MenuTransition()
present(modalViewController, animated: true)
}

Expand Down
2 changes: 1 addition & 1 deletion examples/NavControllerFadeExample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class NavControllerFadeExampleViewController: ExampleViewController {
// controller that you'll make use of is the `transition` property. Setting this property will
// dictate how the view controller is presented. For this example we've built a custom
// FadeTransition, so we'll make use of that now:
modalViewController.transitionController.transition = FadeTransition(target: .foreView)
modalViewController.mdm_transitionController.transition = FadeTransition(target: .foreView)

cachedNavDelegate = navigationController?.delegate

Expand Down
2 changes: 1 addition & 1 deletion examples/PhotoAlbumExample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public class PhotoAlbumExampleViewController: UICollectionViewController, PhotoA
public override func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
let viewController = PhotoAlbumViewController(album: album)
viewController.currentPhoto = album.photos[indexPath.row]
viewController.transitionController.transition = PhotoAlbumTransition(backDelegate: self,
viewController.mdm_transitionController.transition = PhotoAlbumTransition(backDelegate: self,
foreDelegate: viewController)
present(viewController, animated: true)
}
Expand Down
3 changes: 1 addition & 2 deletions src/UIViewController+TransitionController.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
Side effects: If the view controller's transitioningDelegate is nil when the controller is created,
then the controller will also be set to the transitioningDelegate property.
*/
@property(nonatomic, strong, readonly, nonnull) id<MDMTransitionController> mdm_transitionController
NS_SWIFT_NAME(transitionController);
@property(nonatomic, strong, readonly, nonnull) id<MDMTransitionController> mdm_transitionController;

@end
8 changes: 4 additions & 4 deletions tests/unit/TransitionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class TransitionTests: XCTestCase {

func testTransitionDidEndDoesComplete() {
let presentedViewController = UIViewController()
presentedViewController.transitionController.transition = InstantCompletionTransition()
presentedViewController.mdm_transitionController.transition = InstantCompletionTransition()

let didComplete = expectation(description: "Did complete")
window.rootViewController!.present(presentedViewController, animated: true) {
Expand All @@ -46,7 +46,7 @@ class TransitionTests: XCTestCase {

func testTransitionCompositionDoesComplete() {
let presentedViewController = UIViewController()
presentedViewController.transitionController.transition = CompositeTransition(transitions: [
presentedViewController.mdm_transitionController.transition = CompositeTransition(transitions: [
InstantCompletionTransition(),
InstantCompletionTransition()
])
Expand All @@ -64,7 +64,7 @@ class TransitionTests: XCTestCase {
func testTransitionFallbackToOtherTransitionDoesComplete() {
let presentedViewController = UIViewController()
let transition = FallbackTransition(to: InstantCompletionTransition())
presentedViewController.transitionController.transition = transition
presentedViewController.mdm_transitionController.transition = transition

let didComplete = expectation(description: "Did complete")
window.rootViewController!.present(presentedViewController, animated: true) {
Expand All @@ -80,7 +80,7 @@ class TransitionTests: XCTestCase {
func testTransitionFallbackToSelfDoesComplete() {
let presentedViewController = UIViewController()
let transition = FallbackTransition()
presentedViewController.transitionController.transition = transition
presentedViewController.mdm_transitionController.transition = transition

let didComplete = expectation(description: "Did complete")
window.rootViewController!.present(presentedViewController, animated: true) {
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/TransitionWithCustomDurationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class TransitionWithCustomDurationTests: XCTestCase {
func testDefaultDurationIsProvidedViaContext() {
let presentedViewController = UIViewController()
let transition = DurationMemoryTransition()
presentedViewController.transitionController.transition = transition
presentedViewController.mdm_transitionController.transition = transition

let didComplete = expectation(description: "Did complete")
window.rootViewController!.present(presentedViewController, animated: true) {
Expand All @@ -79,7 +79,7 @@ class TransitionWithCustomDurationTests: XCTestCase {
let presentedViewController = UIViewController()
let customDuration: TimeInterval = 0.1
let transition = CustomDurationMemoryTransition(with: customDuration)
presentedViewController.transitionController.transition = transition
presentedViewController.mdm_transitionController.transition = transition

let didComplete = expectation(description: "Did complete")
window.rootViewController!.present(presentedViewController, animated: true) {
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/TransitionWithPresentationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class TransitionWithPresentationTests: XCTestCase {

func testPresentationControllerIsQueriedAndCompletesWithoutAnimation() {
let presentedViewController = UIViewController()
presentedViewController.transitionController.transition =
presentedViewController.mdm_transitionController.transition =
PresentationTransition(presentationControllerType: TestingPresentationController.self)

let didComplete = expectation(description: "Did complete")
Expand All @@ -47,7 +47,7 @@ class TransitionWithPresentationTests: XCTestCase {

func testPresentationControllerIsQueriedAndCompletesWithAnimation() {
let presentedViewController = UIViewController()
presentedViewController.transitionController.transition =
presentedViewController.mdm_transitionController.transition =
PresentationTransition(presentationControllerType: TransitionPresentationController.self)

let didComplete = expectation(description: "Did complete")
Expand Down

0 comments on commit 994fd02

Please sign in to comment.