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
featherless committed Jun 26, 2019
2 parents 8f360fc + fbe5b9a commit 5bb0d57
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 31 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# 7.0.1

This patch release fixes a bug on iOS 13 where the presented view controller would not be added to
the view hierarchy.

## Source changes

* [Always add the toView to the container. (#68)](https://github.com/material-motion/motion-transitioning-objc/commit/0a9568b21375bb5e04e5cf10123eaa06b63f80bd) (featherless)


# 7.0.0

This major release drops official support for iOS 8.
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 = "7.0.0"
s.version = "7.0.1"
s.authors = "The Material Motion Authors"
s.license = "Apache 2.0"
s.homepage = "https://github.com/material-motion/transitioning-objc"
Expand Down
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
workspace 'MotionTransitioning.xcworkspace'
use_frameworks!
platform :ios, '8.0'
platform :ios, '9.0'

target "TransitionsCatalog" do
pod 'CatalogByConvention'
Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ SPEC CHECKSUMS:
CatalogByConvention: c3a5319de04250a7cd4649127fcfca5fe3322a43
MotionTransitioning: afdc2fb08fc6e8744dab4f160b3764c9bde59338

PODFILE CHECKSUM: 25d5942fb7698339a03667bb46c3fbb77529b92d
PODFILE CHECKSUM: c1fb58e87919bf8979e1ee2b4db99797e975d789

COCOAPODS: 1.6.0
4 changes: 2 additions & 2 deletions examples/ContextualExample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import MotionTransitioning

class ContextualExampleViewController: ExampleViewController {

func didTap(_ tapGesture: UITapGestureRecognizer) {
@objc func didTap(_ tapGesture: UITapGestureRecognizer) {
let controller = DestinationViewController()

// A contextual transition is provided with information relevant to the transition, such as the
Expand Down Expand Up @@ -142,7 +142,7 @@ private class DestinationViewController: ExampleViewController {
view.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(didTap)))
}

func didTap() {
@objc func didTap() {
dismiss(animated: true)
}
}
2 changes: 1 addition & 1 deletion examples/FadeExample.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ - (void)didTap {
- (void)viewDidLoad {
[super viewDidLoad];

self.view.backgroundColor = [UIColor backgroundColor];
self.view.backgroundColor = [UIColor whiteColor];

UILabel *label = [[UILabel alloc] initWithFrame:self.view.bounds];
label.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
Expand Down
2 changes: 1 addition & 1 deletion examples/FadeExample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import MotionTransitioning

class FadeExampleViewController: ExampleViewController {

func didTap() {
@objc func didTap() {
let modalViewController = ModalViewController()

// The transition controller is an associated object on all UIViewController instances that
Expand Down
2 changes: 1 addition & 1 deletion examples/MenuExample.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import MotionTransitioning

class MenuExampleViewController: ExampleViewController {

func didTap() {
@objc func didTap() {
let modalViewController = ModalViewController()
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 @@ -22,7 +22,7 @@ import MotionTransitioning

class NavControllerFadeExampleViewController: ExampleViewController {

func didTap() {
@objc func didTap() {
let modalViewController = ModalViewController()
modalViewController.title = "Example view controller"

Expand Down
14 changes: 8 additions & 6 deletions examples/apps/Catalog/TableOfContents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,30 @@
limitations under the License.
*/

import Foundation

// MARK: Catalog by convention

extension ContextualExampleViewController {
class func catalogBreadcrumbs() -> [String] { return ["Contextual transition"] }
@objc class func catalogBreadcrumbs() -> [String] { return ["Contextual transition"] }
}

extension FadeExampleViewController {
class func catalogBreadcrumbs() -> [String] { return ["Fade transition"] }
@objc class func catalogBreadcrumbs() -> [String] { return ["Fade transition"] }
}

extension NavControllerFadeExampleViewController {
class func catalogBreadcrumbs() -> [String] { return ["Fade transition (nav controller)"] }
@objc class func catalogBreadcrumbs() -> [String] { return ["Fade transition (nav controller)"] }
}

extension MenuExampleViewController {
class func catalogBreadcrumbs() -> [String] { return ["Menu transition"] }
@objc class func catalogBreadcrumbs() -> [String] { return ["Menu transition"] }
}

extension PhotoAlbumExampleViewController {
class func catalogBreadcrumbs() -> [String] { return ["Photo album transition"] }
@objc class func catalogBreadcrumbs() -> [String] { return ["Photo album transition"] }
}

extension CustomPresentationExampleViewController {
class func catalogBreadcrumbs() -> [String] { return ["Custom presentation transitions"] }
@objc class func catalogBreadcrumbs() -> [String] { return ["Custom presentation transitions"] }
}
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down Expand Up @@ -709,6 +710,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand Down Expand Up @@ -755,6 +757,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
Expand All @@ -771,7 +774,6 @@
PRODUCT_BUNDLE_IDENTIFIER = com.google.Catalog;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
Expand All @@ -786,7 +788,6 @@
PRODUCT_BUNDLE_IDENTIFIER = com.google.Catalog;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand All @@ -802,7 +803,6 @@
PRODUCT_BUNDLE_IDENTIFIER = com.google.CatalogTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TestHarness.app/TestHarness";
};
name = Debug;
Expand All @@ -819,7 +819,6 @@
PRODUCT_BUNDLE_IDENTIFIER = com.google.CatalogTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/TestHarness.app/TestHarness";
};
name = Release;
Expand All @@ -836,7 +835,6 @@
PRODUCT_BUNDLE_IDENTIFIER = com.google.TestHarness;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 3.0;
};
name = Debug;
};
Expand All @@ -852,7 +850,6 @@
PRODUCT_BUNDLE_IDENTIFIER = com.google.TestHarness;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion examples/supplemental/ModalViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ModalViewController: ExampleViewController {
return .lightContent
}

func didTap() {
@objc func didTap() {
dismiss(animated: true)
}
}
18 changes: 9 additions & 9 deletions src/private/MDMViewControllerTransitionCoordinator.m
Original file line number Diff line number Diff line change
Expand Up @@ -336,17 +336,17 @@ - (void)initiateTransition {
if (!CGRectIsEmpty(finalFrame)) {
toView.frame = finalFrame;
}
}

if (toView.superview == nil) {
switch (_direction) {
case MDMTransitionDirectionForward:
[_transitionContext.containerView addSubview:toView];
break;
if (toView.superview == nil) {
switch (_direction) {
case MDMTransitionDirectionForward:
[_transitionContext.containerView addSubview:toView];
break;

case MDMTransitionDirectionBackward:
[_transitionContext.containerView insertSubview:toView atIndex:0];
break;
}
case MDMTransitionDirectionBackward:
[_transitionContext.containerView insertSubview:toView atIndex:0];
break;
}
}

Expand Down

0 comments on commit 5bb0d57

Please sign in to comment.