This repository has been archived by the owner on Nov 21, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release-candidate' into stable
- Loading branch information
Showing
19 changed files
with
592 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
module: MaterialMotionCoreAnimationTransitionsPlugin | ||
module: MaterialMotionCoreAnimationTransitions | ||
module_version: 1.0.0 | ||
sdk: iphonesimulator | ||
xcodebuild_arguments: | ||
- -workspace | ||
- MaterialMotionCoreAnimationTransitionsPlugin.xcworkspace | ||
- MaterialMotionCoreAnimationTransitions.xcworkspace | ||
- -scheme | ||
- MaterialMotionCoreAnimationTransitionsPlugin | ||
github_url: https://github.com/material-motion/coreanimation-transitions-plugin-swift | ||
github_file_prefix: https://github.com/material-motion/coreanimation-transitions-plugin-swift/tree/v1.0.0 | ||
- MaterialMotionCoreAnimationTransitions | ||
github_url: https://github.com/material-motion/coreanimation-transitions-swift | ||
github_file_prefix: https://github.com/material-motion/coreanimation-transitions-swift/tree/v1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.0 | ||
3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# 1.0.0 | ||
|
||
Initial release includes the TransitionTween plan. | ||
|
||
## Source changes | ||
|
||
* [Add unit tests for TransitionTween.](https://github.com/material-motion/coreanimation-transitions-swift/commit/85ef3ab4f3f52167322bce2503fdd8e0d87c3966) (Jeff Verkoeyen) | ||
* [Add TransitionTween implementation.](https://github.com/material-motion/coreanimation-transitions-swift/commit/a9d44be9df7caef8449c17276226617606b381f9) (Jeff Verkoeyen) | ||
|
||
## API changes | ||
|
||
### TransitionTween | ||
|
||
*new* class: `TransitionTween` | ||
|
||
## Non-source changes | ||
|
||
* [Automatic changelog preparation for release.](https://github.com/material-motion/coreanimation-transitions-swift/commit/ab937db0d83eaef10790d81ee2619845d9e8fb30) (Jeff Verkoeyen) | ||
* [Rename example files.](https://github.com/material-motion/coreanimation-transitions-swift/commit/944deab908ece0f36c3af74a3ffd791370a639ad) (Jeff Verkoeyen) | ||
* [Add features guide and how to.](https://github.com/material-motion/coreanimation-transitions-swift/commit/a5bf738c50df65c8d4760d007137f0a0bdd80bfb) (Jeff Verkoeyen) | ||
* [Ran yo mm-github.](https://github.com/material-motion/coreanimation-transitions-swift/commit/62b7b6ca04839ba9b0d298ddde0becb7bf70a2fc) (Jeff Verkoeyen) |
11 changes: 7 additions & 4 deletions
11
...ionCoreAnimationTransitionsPlugin.podspec → ...ialMotionCoreAnimationTransitions.podspec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
Pod::Spec.new do |s| | ||
s.name = "MaterialMotionCoreAnimationTransitionsPlugin" | ||
s.summary = "Core Animation Transitions Material Motion Plugin" | ||
s.name = "MaterialMotionCoreAnimationTransitions" | ||
s.summary = "Core Animation transitions for Material Motion (Swift)" | ||
s.version = "1.0.0" | ||
s.authors = "The Material Motion Authors" | ||
s.license = "Apache 2.0" | ||
s.homepage = "https://github.com/material-motion/coreanimation-transitions-plugin-swift" | ||
s.source = { :git => "https://github.com/material-motion/coreanimation-transitions-plugin-swift.git", :tag => "v" + s.version.to_s } | ||
s.homepage = "https://github.com/material-motion/coreanimation-transitions-swift" | ||
s.source = { :git => "https://github.com/material-motion/coreanimation-transitions-swift.git", :tag => "v" + s.version.to_s } | ||
s.platform = :ios, "8.0" | ||
s.requires_arc = true | ||
|
||
s.source_files = "src/*.{swift}", "src/private/*.{swift}" | ||
|
||
s.dependency "MaterialMotionTransitions", "~> 1.0" | ||
s.dependency "MaterialMotionCoreAnimation", "~> 2.0" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,29 @@ | ||
PODS: | ||
- CatalogByConvention (2.0.0) | ||
- MaterialMotionCoreAnimationTransitionsPlugin (1.0.0) | ||
- MaterialMotionCoreAnimation (2.0.0): | ||
- MaterialMotionRuntime (~> 6.0) | ||
- MaterialMotionCoreAnimationTransitions (1.0.0): | ||
- MaterialMotionCoreAnimation (~> 2.0) | ||
- MaterialMotionTransitions (~> 1.0) | ||
- MaterialMotionRuntime (6.0.0) | ||
- MaterialMotionTransitions (1.1.0): | ||
- MaterialMotionRuntime (~> 6.0) | ||
|
||
DEPENDENCIES: | ||
- CatalogByConvention | ||
- MaterialMotionCoreAnimationTransitionsPlugin (from `./`) | ||
- MaterialMotionCoreAnimationTransitions (from `./`) | ||
|
||
EXTERNAL SOURCES: | ||
MaterialMotionCoreAnimationTransitionsPlugin: | ||
MaterialMotionCoreAnimationTransitions: | ||
:path: "./" | ||
|
||
SPEC CHECKSUMS: | ||
CatalogByConvention: be55c2263132e4f9f59299ac8a528ee8715b3275 | ||
MaterialMotionCoreAnimationTransitionsPlugin: 91a861e84f5f548e95945b27706f83ffdfc61161 | ||
MaterialMotionCoreAnimation: fc8f32e641c242a7ff40e78248b238f3954c5e75 | ||
MaterialMotionCoreAnimationTransitions: 814ef80700d78a245f04ae8215b7227ff2cdb16d | ||
MaterialMotionRuntime: 89cb395df1ce02134fc67a16b42dc4492b6c514c | ||
MaterialMotionTransitions: b731df47f90a7c8ccc60de1f61446b9f31d08065 | ||
|
||
PODFILE CHECKSUM: 3551f8326c6828d18744f2ec867d3e470c192561 | ||
PODFILE CHECKSUM: dd154e5de50a8ad79a8d5f184a86c6dd98773a88 | ||
|
||
COCOAPODS: 1.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
Copyright 2016-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 MaterialMotionTransitions | ||
import MaterialMotionCoreAnimationTransitions | ||
|
||
class FadeInViewController: UIViewController { | ||
init() { | ||
super.init(nibName: nil, bundle: nil) | ||
title = "Fade in transition" | ||
} | ||
|
||
required init?(coder aDecoder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
override func viewDidLoad() { | ||
super.viewDidLoad() | ||
|
||
view.backgroundColor = .white | ||
|
||
view.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(didTap))) | ||
} | ||
|
||
func didTap() { | ||
if presentingViewController == nil { | ||
let viewController = FadeInViewController() | ||
viewController.mdm_transitionController.directorClass = FadeInTransitionDirector.self | ||
present(viewController, animated: true) | ||
viewController.view.backgroundColor = .blue | ||
} else { | ||
dismiss(animated: true) | ||
} | ||
} | ||
} | ||
|
||
private class FadeInTransitionDirector: NSObject, TransitionDirector { | ||
|
||
let transition: Transition | ||
required init(transition: Transition) { | ||
self.transition = transition | ||
} | ||
|
||
func setUp() { | ||
let fadeIn = TransitionTween("opacity", | ||
transition: transition, | ||
segment: .init(position: 0, length: 1), | ||
back: NSNumber(value: 0), | ||
fore: NSNumber(value: 1)) | ||
fadeIn.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut) | ||
transition.runtime.addPlan(fadeIn, to: transition.foreViewController.view.layer) | ||
} | ||
} |
Oops, something went wrong.