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

Commit 2695fe0

Browse files
author
Jeff Verkoeyen
committed
Merge branch 'release-candidate' into stable
2 parents 303574d + 53949fa commit 2695fe0

File tree

8 files changed

+109
-4
lines changed

8 files changed

+109
-4
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# 1.1.1
2+
3+
This is a patch fix release to address build issues within Google's build environment.
4+
5+
## Source changes
6+
7+
* [Add missing UIKit.h header imports.](https://github.com/material-motion/transitioning-objc/commit/3b653bdd1758a5c47d277af36369e977b3774095) (Jeff Verkoeyen)
8+
9+
## Non-source changes
10+
11+
* [Update Podfile.lock.](https://github.com/material-motion/transitioning-objc/commit/8185ae402e6952e2727af8b7ff0cb4c712d05623) (Jeff Verkoeyen)
12+
* [Add sliding menu as an example (#21)](https://github.com/material-motion/transitioning-objc/commit/4654e4c9c4c4ff49ac007f4b16eaa2458d86f98c) (Eric Tang)
13+
114
# 1.1.0
215

316
This minor release introduces two new features to the Transition protocol family.

Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PODS:
22
- CatalogByConvention (2.1.1)
3-
- Transitioning (1.0.0)
3+
- Transitioning (1.1.1)
44

55
DEPENDENCIES:
66
- CatalogByConvention
@@ -12,7 +12,7 @@ EXTERNAL SOURCES:
1212

1313
SPEC CHECKSUMS:
1414
CatalogByConvention: c3a5319de04250a7cd4649127fcfca5fe3322a43
15-
Transitioning: d2d2d0609e0acf133f7049ff5ddbe7ca16973f07
15+
Transitioning: ea1a8225812799c7ff07630af17008ab5e306bf3
1616

1717
PODFILE CHECKSUM: 1949e62e9d70d554783c0bb931d6b52780775cfb
1818

Transitioning.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = "Transitioning"
33
s.summary = "Light-weight API for building UIViewController transitions."
4-
s.version = "1.1.0"
4+
s.version = "1.1.1"
55
s.authors = "The Material Motion Authors"
66
s.license = "Apache 2.0"
77
s.homepage = "https://github.com/material-motion/transitioning-objc"

examples/MenuExample.swift

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
/*
2+
Copyright 2017-present The Material Motion Authors. All Rights Reserved.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
import UIKit
18+
import Transitioning
19+
20+
class MenuExampleViewController: ExampleViewController {
21+
22+
func didTap() {
23+
let modalViewController = ModalViewController()
24+
modalViewController.transitionController.transition = MenuTransition()
25+
present(modalViewController, animated: true)
26+
}
27+
28+
override func viewDidLoad() {
29+
super.viewDidLoad()
30+
31+
let label = UILabel(frame: view.bounds)
32+
label.autoresizingMask = [.flexibleWidth, .flexibleHeight]
33+
label.textColor = .white
34+
label.textAlignment = .center
35+
label.text = "Tap to start the transition"
36+
view.addSubview(label)
37+
38+
let tap = UITapGestureRecognizer(target: self, action: #selector(didTap))
39+
view.addGestureRecognizer(tap)
40+
}
41+
42+
override func exampleInformation() -> ExampleInfo {
43+
return .init(title: type(of: self).catalogBreadcrumbs().last!,
44+
instructions: "Tap to present a modal transition.")
45+
}
46+
}
47+
48+
private final class MenuTransition: NSObject, TransitionWithPresentation {
49+
func presentationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController?) -> UIPresentationController? {
50+
return nil
51+
}
52+
53+
func defaultModalPresentationStyle() -> UIModalPresentationStyle {
54+
return .overCurrentContext
55+
}
56+
57+
func start(with context: TransitionContext) {
58+
let foreView = context.foreViewController.view!
59+
if(context.direction == .forward) {
60+
foreView.frame.origin.x = -1 * foreView.frame.width
61+
UIView.animate(
62+
withDuration: context.duration,
63+
animations: {
64+
foreView.frame.origin.x = -1 * (foreView.frame.width / 2)
65+
},
66+
completion: { _ in
67+
context.transitionDidEnd()
68+
}
69+
)
70+
} else {
71+
UIView.animate(
72+
withDuration: context.duration,
73+
animations: {
74+
foreView.frame.origin.x = -1 * foreView.frame.width
75+
},
76+
completion: { _ in
77+
context.transitionDidEnd()
78+
}
79+
)
80+
}
81+
}
82+
}

examples/apps/Catalog/TableOfContents.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ extension FadeExampleViewController {
2020
class func catalogBreadcrumbs() -> [String] { return ["1. Fade transition"] }
2121
}
2222

23+
extension MenuExampleViewController {
24+
class func catalogBreadcrumbs() -> [String] { return ["2. Menu transition"] }
25+
}
26+
2327
extension CustomPresentationExampleViewController {
24-
class func catalogBreadcrumbs() -> [String] { return ["2. Custom presentation transitions"] }
28+
class func catalogBreadcrumbs() -> [String] { return ["3. Custom presentation transitions"] }
2529
}

examples/apps/Catalog/TransitionsCatalog.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
objects = {
88

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

4849
/* Begin PBXFileReference section */
50+
072A063A1EEE26A900B9B5FC /* MenuExample.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MenuExample.swift; sourceTree = "<group>"; };
4951
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>"; };
5052
2408A4B72C0BA93CC963452F /* Pods_UnitTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_UnitTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5153
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>"; };
@@ -169,6 +171,7 @@
169171
6629151D1ED5E0E0002B9A5D /* CustomPresentationExample.swift */,
170172
66BBC7731ED729A70015CB9B /* FadeExample.h */,
171173
66BBC7741ED729A70015CB9B /* FadeExample.m */,
174+
072A063A1EEE26A900B9B5FC /* MenuExample.swift */,
172175
);
173176
name = examples;
174177
path = ../..;
@@ -472,6 +475,7 @@
472475
666FAA841D384A6B000363DA /* AppDelegate.swift in Sources */,
473476
66BBC76F1ED4C8790015CB9B /* HexColor.swift in Sources */,
474477
66BBC7751ED729A80015CB9B /* FadeExample.m in Sources */,
478+
072A063B1EEE26A900B9B5FC /* MenuExample.swift in Sources */,
475479
66BBC76D1ED4C8790015CB9B /* ExampleViewController.swift in Sources */,
476480
667A3F541DEE273000CB3A99 /* TableOfContents.swift in Sources */,
477481
66BBC7701ED4C8790015CB9B /* Layout.swift in Sources */,

src/UIViewController+TransitionController.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
#import <Foundation/Foundation.h>
18+
#import <UIKit/UIKit.h>
1819

1920
@protocol MDMTransitionController;
2021

src/private/MDMPresentationTransitionController.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
#import <Foundation/Foundation.h>
18+
#import <UIKit/UIKit.h>
1819

1920
#import "MDMTransitionController.h"
2021

0 commit comments

Comments
 (0)