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 Jun 14, 2017
2 parents 303574d + 53949fa commit 2695fe0
Show file tree
Hide file tree
Showing 8 changed files with 109 additions and 4 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# 1.1.1

This is a patch fix release to address build issues within Google's build environment.

## Source changes

* [Add missing UIKit.h header imports.](https://github.com/material-motion/transitioning-objc/commit/3b653bdd1758a5c47d277af36369e977b3774095) (Jeff Verkoeyen)

## Non-source changes

* [Update Podfile.lock.](https://github.com/material-motion/transitioning-objc/commit/8185ae402e6952e2727af8b7ff0cb4c712d05623) (Jeff Verkoeyen)
* [Add sliding menu as an example (#21)](https://github.com/material-motion/transitioning-objc/commit/4654e4c9c4c4ff49ac007f4b16eaa2458d86f98c) (Eric Tang)

# 1.1.0

This minor release introduces two new features to the Transition protocol family.
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)
- Transitioning (1.0.0)
- Transitioning (1.1.1)

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

SPEC CHECKSUMS:
CatalogByConvention: c3a5319de04250a7cd4649127fcfca5fe3322a43
Transitioning: d2d2d0609e0acf133f7049ff5ddbe7ca16973f07
Transitioning: ea1a8225812799c7ff07630af17008ab5e306bf3

PODFILE CHECKSUM: 1949e62e9d70d554783c0bb931d6b52780775cfb

Expand Down
2 changes: 1 addition & 1 deletion Transitioning.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "Transitioning"
s.summary = "Light-weight API for building UIViewController transitions."
s.version = "1.1.0"
s.version = "1.1.1"
s.authors = "The Material Motion Authors"
s.license = "Apache 2.0"
s.homepage = "https://github.com/material-motion/transitioning-objc"
Expand Down
82 changes: 82 additions & 0 deletions examples/MenuExample.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/*
Copyright 2017-present The Material Motion Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

import UIKit
import Transitioning

class MenuExampleViewController: ExampleViewController {

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

override func viewDidLoad() {
super.viewDidLoad()

let label = UILabel(frame: view.bounds)
label.autoresizingMask = [.flexibleWidth, .flexibleHeight]
label.textColor = .white
label.textAlignment = .center
label.text = "Tap to start the transition"
view.addSubview(label)

let tap = UITapGestureRecognizer(target: self, action: #selector(didTap))
view.addGestureRecognizer(tap)
}

override func exampleInformation() -> ExampleInfo {
return .init(title: type(of: self).catalogBreadcrumbs().last!,
instructions: "Tap to present a modal transition.")
}
}

private final class MenuTransition: NSObject, TransitionWithPresentation {
func presentationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController?) -> UIPresentationController? {
return nil
}

func defaultModalPresentationStyle() -> UIModalPresentationStyle {
return .overCurrentContext
}

func start(with context: TransitionContext) {
let foreView = context.foreViewController.view!
if(context.direction == .forward) {
foreView.frame.origin.x = -1 * foreView.frame.width
UIView.animate(
withDuration: context.duration,
animations: {
foreView.frame.origin.x = -1 * (foreView.frame.width / 2)
},
completion: { _ in
context.transitionDidEnd()
}
)
} else {
UIView.animate(
withDuration: context.duration,
animations: {
foreView.frame.origin.x = -1 * foreView.frame.width
},
completion: { _ in
context.transitionDidEnd()
}
)
}
}
}
6 changes: 5 additions & 1 deletion examples/apps/Catalog/TableOfContents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ extension FadeExampleViewController {
class func catalogBreadcrumbs() -> [String] { return ["1. Fade transition"] }
}

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

extension CustomPresentationExampleViewController {
class func catalogBreadcrumbs() -> [String] { return ["2. Custom presentation transitions"] }
class func catalogBreadcrumbs() -> [String] { return ["3. Custom presentation transitions"] }
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
072A063B1EEE26A900B9B5FC /* MenuExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 072A063A1EEE26A900B9B5FC /* MenuExample.swift */; };
6629151E1ED5E0E0002B9A5D /* CustomPresentationExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6629151D1ED5E0E0002B9A5D /* CustomPresentationExample.swift */; };
662915201ED5E137002B9A5D /* ModalViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6629151F1ED5E137002B9A5D /* ModalViewController.swift */; };
662915231ED64A10002B9A5D /* TransitionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 662915221ED64A10002B9A5D /* TransitionTests.swift */; };
Expand Down Expand Up @@ -46,6 +47,7 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
072A063A1EEE26A900B9B5FC /* MenuExample.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MenuExample.swift; sourceTree = "<group>"; };
0C2327F961D4F16DEBF0EEB8 /* Pods-UnitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-UnitTests.debug.xcconfig"; path = "../../../Pods/Target Support Files/Pods-UnitTests/Pods-UnitTests.debug.xcconfig"; sourceTree = "<group>"; };
2408A4B72C0BA93CC963452F /* Pods_UnitTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_UnitTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3734DFFD1C84494E48784617 /* Pods-TransitionsCatalog.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TransitionsCatalog.release.xcconfig"; path = "../../../Pods/Target Support Files/Pods-TransitionsCatalog/Pods-TransitionsCatalog.release.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -169,6 +171,7 @@
6629151D1ED5E0E0002B9A5D /* CustomPresentationExample.swift */,
66BBC7731ED729A70015CB9B /* FadeExample.h */,
66BBC7741ED729A70015CB9B /* FadeExample.m */,
072A063A1EEE26A900B9B5FC /* MenuExample.swift */,
);
name = examples;
path = ../..;
Expand Down Expand Up @@ -472,6 +475,7 @@
666FAA841D384A6B000363DA /* AppDelegate.swift in Sources */,
66BBC76F1ED4C8790015CB9B /* HexColor.swift in Sources */,
66BBC7751ED729A80015CB9B /* FadeExample.m in Sources */,
072A063B1EEE26A900B9B5FC /* MenuExample.swift in Sources */,
66BBC76D1ED4C8790015CB9B /* ExampleViewController.swift in Sources */,
667A3F541DEE273000CB3A99 /* TableOfContents.swift in Sources */,
66BBC7701ED4C8790015CB9B /* Layout.swift in Sources */,
Expand Down
1 change: 1 addition & 0 deletions src/UIViewController+TransitionController.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@protocol MDMTransitionController;

Expand Down
1 change: 1 addition & 0 deletions src/private/MDMPresentationTransitionController.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

#import "MDMTransitionController.h"

Expand Down

0 comments on commit 2695fe0

Please sign in to comment.